mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-09 00:07:21 +00:00
Supercede 'Propagate Substrate#4284 to Polkadot' (#695)
* Propagate Substrate#4284 to Polkadot * Fix tests * Fixes * Use hash part of fund id as child unique id. * Add comma * Switch branch * run cargo update * Update polkadot-master only * Fix collator
This commit is contained in:
@@ -19,11 +19,11 @@
|
||||
#![allow(unused)]
|
||||
|
||||
use crate::gossip::GossipMessage;
|
||||
use sc_network::Context as NetContext;
|
||||
use sc_network::consensus_gossip::TopicNotification;
|
||||
use sc_network::{Context as NetContext, PeerId};
|
||||
use sc_network_gossip::TopicNotification;
|
||||
use sp_core::{NativeOrEncoded, ExecutionContext};
|
||||
use sp_keyring::Sr25519Keyring;
|
||||
use crate::{GossipService, PolkadotProtocol, NetworkService, GossipMessageStream};
|
||||
use crate::{PolkadotProtocol, NetworkService, GossipMessageStream};
|
||||
|
||||
use polkadot_validation::{SharedTable, Network};
|
||||
use polkadot_primitives::{Block, BlockNumber, Hash, Header, BlockId};
|
||||
@@ -124,17 +124,15 @@ impl NetworkService for TestNetwork {
|
||||
GossipMessageStream::new(rx.boxed())
|
||||
}
|
||||
|
||||
fn send_message(&self, _: PeerId, _: GossipMessage) {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
fn gossip_message(&self, topic: Hash, message: GossipMessage) {
|
||||
let notification = TopicNotification { message: message.encode(), sender: None };
|
||||
let _ = self.gossip.send_message.unbounded_send((topic, notification));
|
||||
}
|
||||
|
||||
fn with_gossip<F: Send + 'static>(&self, with: F)
|
||||
where F: FnOnce(&mut dyn GossipService, &mut dyn NetContext<Block>)
|
||||
{
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
fn with_spec<F: Send + 'static>(&self, with: F)
|
||||
where F: FnOnce(&mut PolkadotProtocol, &mut dyn NetContext<Block>)
|
||||
{
|
||||
@@ -310,7 +308,6 @@ impl ParachainHost<Block> for RuntimeApi {
|
||||
type TestValidationNetwork = crate::validation::ValidationNetwork<
|
||||
TestApi,
|
||||
NeverExit,
|
||||
TestNetwork,
|
||||
TaskExecutor,
|
||||
>;
|
||||
|
||||
@@ -337,9 +334,8 @@ fn build_network(n: usize, executor: TaskExecutor) -> Built {
|
||||
);
|
||||
|
||||
TestValidationNetwork::new(
|
||||
net,
|
||||
NeverExit,
|
||||
message_val,
|
||||
NeverExit,
|
||||
runtime_api.clone(),
|
||||
executor.clone(),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user