mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-23 21:21:06 +00:00
client/network-gossip: Merge GossipEngine and GossipEngineInner (#5042)
* client/network-gossip: Merge GossipEngine and GossipEngineInner Given that GossipEngine and GossipEngineInner are not shared between threads anyone (public interface + background tasks), neither depends on being Send or Sync. Thus one can merge the two as done in this patch. One only needs to wrap an `Arc<Mutex<>>` around the whole structure when the owner (e.g. finality-grandpa) needs to share the gossip engine between threads. * client/finality-grandpa: Wrap GossipEngine in Arc Mutex & lock it on use GossipEngine in itself has no need to be Send and Sync, given that it does not rely on separately spawned background tasks anymore. Given that finality-grandpa shares the `NetworkBridge` potentially between threads its components need to be clonable, thus this patch wraps `GossipEngine` in an `Arc<Mutex<>>`.
This commit is contained in:
Generated
-1
@@ -6245,7 +6245,6 @@ dependencies = [
|
||||
"libp2p",
|
||||
"log 0.4.8",
|
||||
"lru",
|
||||
"parking_lot 0.10.0",
|
||||
"sc-network",
|
||||
"sp-runtime",
|
||||
"wasm-timer",
|
||||
|
||||
Reference in New Issue
Block a user