mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 11:38:01 +00:00
Integration tests (#805)
* Started substrate tests * Sync test * Test updates * Improved tests * Use on-chain block delay * Parallel test execution * Otimized tests * Logging * Fixed racing test * Fixed compilation * Fixed timestamp test * Removed rlp dependency * Minor fixes * Fixed tests * Removed best_block_id and resolved fdlimit issue * Whitespace * Use keyring * Style * Added API execution setting * Removed stale import
This commit is contained in:
committed by
Gav Wood
parent
955a5393d8
commit
9a660f82ed
@@ -32,6 +32,7 @@ use futures::sync::mpsc;
|
||||
use std::sync::Arc;
|
||||
|
||||
use tokio::runtime::TaskExecutor;
|
||||
use tokio::executor::Executor;
|
||||
|
||||
use super::NetworkService;
|
||||
|
||||
@@ -260,7 +261,7 @@ impl<P: AuthoringApi + Send + Sync + 'static> Network for ConsensusNetwork<P> {
|
||||
&self, validators: &[SessionKey],
|
||||
local_id: SessionKey,
|
||||
parent_hash: Hash,
|
||||
task_executor: TaskExecutor
|
||||
mut task_executor: TaskExecutor
|
||||
) -> (Self::Input, Self::Output)
|
||||
{
|
||||
let sink = BftSink {
|
||||
@@ -284,7 +285,10 @@ impl<P: AuthoringApi + Send + Sync + 'static> Network for ConsensusNetwork<P> {
|
||||
});
|
||||
|
||||
match process_task {
|
||||
Some(task) => task_executor.spawn(task),
|
||||
Some(task) =>
|
||||
if let Err(e) = Executor::spawn(&mut task_executor, Box::new(task)) {
|
||||
debug!(target: "node-network", "Cannot spawn message processing: {:?}", e)
|
||||
},
|
||||
None => warn!(target: "node-network", "Cannot process incoming messages: network appears to be down"),
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user