diff --git a/node/core/dispute-coordinator/src/real/mod.rs b/node/core/dispute-coordinator/src/real/mod.rs index f0d0f5b8597a..b4a1437d7d55 100644 --- a/node/core/dispute-coordinator/src/real/mod.rs +++ b/node/core/dispute-coordinator/src/real/mod.rs @@ -38,7 +38,7 @@ use polkadot_node_primitives::{ use polkadot_node_subsystem::{ errors::{ChainApiError, RuntimeApiError}, messages::{ - BlockDescription, ChainApiMessage, DisputeCoordinatorMessage, DisputeDistributionMessage, + BlockDescription, DisputeCoordinatorMessage, DisputeDistributionMessage, DisputeParticipationMessage, ImportStatementsResult, }, overseer, FromOverseer, OverseerSignal, SpawnedSubsystem, SubsystemContext, SubsystemError, @@ -631,7 +631,6 @@ async fn handle_import_statements( session: SessionIndex, statements: Vec<(SignedDisputeStatement, ValidatorIndex)>, now: Timestamp, - pending_confirmation: oneshot::Sender, metrics: &Metrics, ) -> Result { if state.highest_session.map_or(true, |h| session + DISPUTE_WINDOW < h) { @@ -913,7 +912,7 @@ async fn issue_local_statement( now, metrics, ) - .await? + .await { Err(_) => { tracing::error!( diff --git a/node/core/dispute-coordinator/src/real/tests.rs b/node/core/dispute-coordinator/src/real/tests.rs index 2f78a5c48707..c8709da92916 100644 --- a/node/core/dispute-coordinator/src/real/tests.rs +++ b/node/core/dispute-coordinator/src/real/tests.rs @@ -26,9 +26,7 @@ use overseer::TimeoutExt; use parity_scale_codec::Encode; use polkadot_node_subsystem::{ jaeger, - messages::{ - AllMessages, BlockDescription, ChainApiMessage, RuntimeApiMessage, RuntimeApiRequest, - }, + messages::{AllMessages, BlockDescription, RuntimeApiMessage, RuntimeApiRequest}, ActivatedLeaf, ActiveLeavesUpdate, LeafStatus, }; use polkadot_node_subsystem_test_helpers::{make_subsystem_context, TestSubsystemContextHandle}; @@ -170,33 +168,22 @@ impl TestState { ))) .await; - self.handle_sync_queries(virtual_overseer, block_hash, block_header, session) - .await; + self.handle_sync_queries(virtual_overseer, block_hash, session).await; } async fn handle_sync_queries( &self, virtual_overseer: &mut VirtualOverseer, block_hash: Hash, - block_header: Header, session: SessionIndex, ) { - assert_matches!( - virtual_overseer.recv().await, - AllMessages::ChainApi(ChainApiMessage::BlockHeader(h, tx)) => { - assert_eq!(h, block_hash); - let _ = tx.send(Ok(Some(block_header))); - } - ); - assert_matches!( virtual_overseer.recv().await, AllMessages::RuntimeApi(RuntimeApiMessage::Request( h, RuntimeApiRequest::SessionIndexForChild(tx), )) => { - let parent_hash = session_to_hash(session, b"parent"); - assert_eq!(h, parent_hash); + assert_eq!(h, block_hash); let _ = tx.send(Ok(session)); } ); @@ -236,8 +223,7 @@ impl TestState { ))) .await; - let header = self.headers.get(leaf).unwrap().clone(); - self.handle_sync_queries(virtual_overseer, *leaf, header, session).await; + self.handle_sync_queries(virtual_overseer, *leaf, session).await; } } diff --git a/scripts/gitlab/test_linux_stable.sh b/scripts/gitlab/test_linux_stable.sh index 8ba62ecbbb80..f7b36141af3a 100755 --- a/scripts/gitlab/test_linux_stable.sh +++ b/scripts/gitlab/test_linux_stable.sh @@ -4,4 +4,5 @@ set -e #shellcheck source=../common/lib.sh source "$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )/../common/lib.sh" +time cargo test --release --locked -p polkadot-node-core-dispute-coordinator --features disputes time cargo test --workspace --release --verbose --locked --features=runtime-benchmarks