mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-28 09:47:56 +00:00
Fix service setup for non-validator nodes (#378)
* Fix service setup for non-validator nodes * Apply suggestions
This commit is contained in:
committed by
Gavin Wood
parent
2c6409a942
commit
da39da8a04
@@ -169,6 +169,16 @@ pub fn register_validator<O: KnownOracle + 'static>(
|
||||
RegisteredMessageValidator { inner: validator as _ }
|
||||
}
|
||||
|
||||
/// Register a gossip validator for a non-authority node.
|
||||
pub fn register_non_authority_validator(service: Arc<NetworkService>) {
|
||||
service.with_gossip(|gossip, ctx|
|
||||
gossip.register_validator(
|
||||
ctx,
|
||||
POLKADOT_ENGINE_ID,
|
||||
Arc::new(substrate_network::consensus_gossip::DiscardAll)),
|
||||
);
|
||||
}
|
||||
|
||||
/// A registered message validator.
|
||||
///
|
||||
/// Create this using `register_validator`.
|
||||
|
||||
Reference in New Issue
Block a user