mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-02-21 18:58:32 +00:00
Bump nim-eth module and add async raises for eth2 discovery (#6344)
This commit is contained in:
parent
77d926525f
commit
741075aada
@ -127,7 +127,7 @@ proc queryRandom*(
|
||||
forkId: ENRForkID,
|
||||
wantedAttnets: AttnetBits,
|
||||
wantedSyncnets: SyncnetBits,
|
||||
minScore: int): Future[seq[Node]] {.async.} =
|
||||
minScore: int): Future[seq[Node]] {.async: (raises: [CancelledError]).} =
|
||||
## Perform a discovery query for a random target
|
||||
## (forkId) and matching at least one of the attestation subnets.
|
||||
|
||||
@ -143,7 +143,7 @@ proc queryRandom*(
|
||||
peerForkId =
|
||||
try:
|
||||
SSZ.decode(eth2FieldBytes, ENRForkID)
|
||||
except SszError as e:
|
||||
except SerializationError as e:
|
||||
debug "Could not decode the eth2 field of peer",
|
||||
peer = n.record.toURI(), exception = e.name, msg = e.msg
|
||||
continue
|
||||
@ -156,7 +156,7 @@ proc queryRandom*(
|
||||
let attnetsNode =
|
||||
try:
|
||||
SSZ.decode(attnetsBytes.get(), AttnetBits)
|
||||
except SszError as e:
|
||||
except SerializationError as e:
|
||||
debug "Could not decode the attnets ERN bitfield of peer",
|
||||
peer = n.record.toURI(), exception = e.name, msg = e.msg
|
||||
continue
|
||||
@ -170,7 +170,7 @@ proc queryRandom*(
|
||||
let syncnetsNode =
|
||||
try:
|
||||
SSZ.decode(syncnetsBytes.get(), SyncnetBits)
|
||||
except SszError as e:
|
||||
except SerializationError as e:
|
||||
debug "Could not decode the syncnets ENR bitfield of peer",
|
||||
peer = n.record.toURI(), exception = e.name, msg = e.msg
|
||||
continue
|
||||
|
@ -1550,7 +1550,7 @@ proc getLowSubnets(node: Eth2Node, epoch: Epoch): (AttnetBits, SyncnetBits) =
|
||||
default(SyncnetBits)
|
||||
)
|
||||
|
||||
proc runDiscoveryLoop(node: Eth2Node) {.async.} =
|
||||
proc runDiscoveryLoop(node: Eth2Node) {.async: (raises: [CancelledError]).} =
|
||||
debug "Starting discovery loop"
|
||||
|
||||
while true:
|
||||
|
2
vendor/nim-eth
vendored
2
vendor/nim-eth
vendored
@ -1 +1 @@
|
||||
Subproject commit c482b4c5b658a77cc96b49d4a397aa6d98472ac7
|
||||
Subproject commit c3f9160fd23010f65b1d4756cfd5c04272c20264
|
Loading…
x
Reference in New Issue
Block a user