Remove necessity to pass ConsensusEngineId when registering notifications protocol (#7549)

* Remove necessity to pass ConsensusEngineId when registering notifications protocol

* Line width

* Fix tests protocol name

* Other renames

* Doc update

* Change issue in TODO
This commit is contained in:
Pierre Krieger
2020-11-18 16:05:35 +01:00
committed by GitHub
parent 22a02d3e7a
commit 1eae9f5792
18 changed files with 228 additions and 284 deletions
+2 -2
View File
@@ -58,7 +58,7 @@ use sp_core::H256;
use sc_network::config::ProtocolConfig;
use sp_runtime::generic::{BlockId, OpaqueDigestItemId};
use sp_runtime::traits::{Block as BlockT, Header as HeaderT, NumberFor};
use sp_runtime::{ConsensusEngineId, Justification};
use sp_runtime::Justification;
use substrate_test_runtime_client::{self, AccountKeyring};
use sc_service::client::Client;
pub use sc_network::config::EmptyTransactionPool;
@@ -557,7 +557,7 @@ pub struct FullPeerConfig {
/// Block announce validator.
pub block_announce_validator: Option<Box<dyn BlockAnnounceValidator<Block> + Send + Sync>>,
/// List of notification protocols that the network must support.
pub notifications_protocols: Vec<(ConsensusEngineId, Cow<'static, str>)>,
pub notifications_protocols: Vec<Cow<'static, str>>,
}
pub trait TestNetFactory: Sized {