mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-09 07:07:59 +00:00
e8f3c6a686
* 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<>>`.
22 lines
695 B
TOML
22 lines
695 B
TOML
[package]
|
|
description = "Gossiping for the Substrate network protocol"
|
|
name = "sc-network-gossip"
|
|
version = "0.8.0-alpha.3"
|
|
license = "GPL-3.0"
|
|
authors = ["Parity Technologies <admin@parity.io>"]
|
|
edition = "2018"
|
|
homepage = "https://substrate.dev"
|
|
repository = "https://github.com/paritytech/substrate/"
|
|
documentation = "https://docs.rs/sc-network-gossip"
|
|
|
|
|
|
[dependencies]
|
|
futures = "0.3.1"
|
|
futures-timer = "3.0.1"
|
|
libp2p = { version = "0.16.2", default-features = false, features = ["libp2p-websocket"] }
|
|
log = "0.4.8"
|
|
lru = "0.4.3"
|
|
sc-network = { version = "0.8.0-alpha.2", path = "../network" }
|
|
sp-runtime = { version = "2.0.0-alpha.2", path = "../../primitives/runtime" }
|
|
wasm-timer = "0.2"
|