mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 10:31:04 +00:00
change ActiveLeaves to contain at most one activated (#3525)
* change ActiveLeaves to contain at most one activated * fix test
This commit is contained in:
@@ -31,4 +31,3 @@ sc-network = { git = "https://github.com/paritytech/substrate", branch = "master
|
||||
futures-timer = "3.0.2"
|
||||
assert_matches = "1.4.0"
|
||||
maplit = "1.0"
|
||||
smallvec = "1.6.1"
|
||||
|
||||
@@ -18,7 +18,6 @@ use std::{collections::{HashMap, HashSet}, sync::Arc, time::Duration};
|
||||
|
||||
use polkadot_node_subsystem_util::TimeoutExt;
|
||||
use polkadot_subsystem_testhelpers::TestSubsystemContextHandle;
|
||||
use smallvec::smallvec;
|
||||
|
||||
use futures::{FutureExt, channel::oneshot, SinkExt, channel::mpsc, StreamExt};
|
||||
use futures_timer::Delay;
|
||||
@@ -171,13 +170,13 @@ impl TestState {
|
||||
self
|
||||
.relay_chain.iter().zip(advanced)
|
||||
.map(|(old, new)| ActiveLeavesUpdate {
|
||||
activated: smallvec![ActivatedLeaf {
|
||||
activated: Some(ActivatedLeaf {
|
||||
hash: new.clone(),
|
||||
number: 1,
|
||||
status: LeafStatus::Fresh,
|
||||
span: Arc::new(jaeger::Span::Disabled),
|
||||
}],
|
||||
deactivated: smallvec![old.clone()],
|
||||
}),
|
||||
deactivated: vec![old.clone()].into(),
|
||||
}).collect::<Vec<_>>()
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user