mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-23 21:15:41 +00:00
client/network-gossip: Move sink IO outside of state_machine (#5669)
* client/network-gossip: Move sink IO outside of state_machine `ConsensusGossip` is supposed to be a deterministic state machine. `GossipEngine` wrapping `ConsensusGossip` should handle IO operations. This commit moves the `message_sink` IO operations to `GossipEngine`. More specifically on incoming messages a `GossipEngine` calls `ConsensusGossip::on_incoming` to validate and register the messages. `ConsensusGossip` returns the valid messages which are then forwarded by `GossipEngine` to the upper layer via the `message_sinks`. * client/network-gossip: Adjust and extend tests * Update client/network-gossip/src/bridge.rs Co-authored-by: Benjamin Kampmann <ben.kampmann@googlemail.com>
This commit is contained in:
@@ -25,4 +25,5 @@ sp-utils = { version = "2.0.0-dev", path = "../../primitives/utils" }
|
||||
wasm-timer = "0.2"
|
||||
|
||||
[dev-dependencies]
|
||||
async-std = "1.5"
|
||||
substrate-test-runtime-client = { version = "2.0.0-dev", path = "../../test-utils/runtime/client" }
|
||||
|
||||
Reference in New Issue
Block a user