mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-02-28 06:00:39 +00:00
Implement the merge networking req/resp changes (#2922)
The other part of this change was already implemented in the `sendResponseChunk` function.
This commit is contained in:
parent
4aed54200d
commit
554a31d20d
@ -10,7 +10,7 @@
|
|||||||
import
|
import
|
||||||
options, tables, sets, macros,
|
options, tables, sets, macros,
|
||||||
chronicles, chronos, stew/ranges/bitranges, libp2p/switch,
|
chronicles, chronos, stew/ranges/bitranges, libp2p/switch,
|
||||||
../spec/datatypes/[phase0, altair],
|
../spec/datatypes/[phase0, altair, merge],
|
||||||
../spec/[helpers, forks, network],
|
../spec/[helpers, forks, network],
|
||||||
".."/[beacon_node_types, beacon_clock],
|
".."/[beacon_node_types, beacon_clock],
|
||||||
../networking/eth2_network,
|
../networking/eth2_network,
|
||||||
@ -79,6 +79,12 @@ proc readChunkPayload*(conn: Connection, peer: Peer,
|
|||||||
return ok ForkedSignedBeaconBlock.init(res.get)
|
return ok ForkedSignedBeaconBlock.init(res.get)
|
||||||
else:
|
else:
|
||||||
return err(res.error)
|
return err(res.error)
|
||||||
|
elif contextBytes == peer.network.forkDigests.merge:
|
||||||
|
let res = await readChunkPayload(conn, peer, merge.SignedBeaconBlock)
|
||||||
|
if res.isOk:
|
||||||
|
return ok ForkedSignedBeaconBlock.init(res.get)
|
||||||
|
else:
|
||||||
|
return err(res.error)
|
||||||
else:
|
else:
|
||||||
return neterr InvalidContextBytes
|
return neterr InvalidContextBytes
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user