Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
parity
Mirrored projects
polkadot
Commits
b11948c8
Unverified
Commit
b11948c8
authored
Jul 27, 2021
by
Andronik Ordian
Committed by
GitHub
Jul 27, 2021
Browse files
change ActiveLeaves to contain at most one activated (#3525)
* change ActiveLeaves to contain at most one activated * fix test
parent
7aed7a2e
Pipeline
#149205
passed with stages
in 37 minutes and 58 seconds
Changes
14
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Cargo.lock
View file @
b11948c8
...
...
@@ -5932,7 +5932,6 @@ dependencies = [
"polkadot-primitives",
"rand 0.8.4",
"sc-network",
"smallvec 1.6.1",
"sp-application-crypto",
"sp-core",
"sp-keyring",
...
...
@@ -5962,7 +5961,6 @@ dependencies = [
"polkadot-primitives",
"rand 0.8.4",
"sc-network",
"smallvec 1.6.1",
"sp-application-crypto",
"sp-core",
"sp-keyring",
...
...
node/core/av-store/src/tests.rs
View file @
b11948c8
...
...
@@ -255,15 +255,12 @@ fn runtime_api_error_does_not_stop_the_subsystem() {
overseer_signal
(
&
mut
virtual_overseer
,
OverseerSignal
::
ActiveLeaves
(
ActiveLeavesUpdate
{
activated
:
vec!
[
ActivatedLeaf
{
hash
:
new_leaf
,
number
:
1
,
status
:
LeafStatus
::
Fresh
,
span
:
Arc
::
new
(
jaeger
::
Span
::
Disabled
),
}]
.into
(),
deactivated
:
vec!
[]
.into
(),
}),
OverseerSignal
::
ActiveLeaves
(
ActiveLeavesUpdate
::
start_work
(
ActivatedLeaf
{
hash
:
new_leaf
,
number
:
1
,
status
:
LeafStatus
::
Fresh
,
span
:
Arc
::
new
(
jaeger
::
Span
::
Disabled
),
})),
)
.await
;
let
header
=
Header
{
...
...
@@ -806,15 +803,12 @@ fn we_dont_miss_anything_if_import_notifications_are_missed() {
overseer_signal
(
&
mut
virtual_overseer
,
OverseerSignal
::
ActiveLeaves
(
ActiveLeavesUpdate
{
activated
:
vec!
[
ActivatedLeaf
{
hash
:
new_leaf
,
number
:
4
,
status
:
LeafStatus
::
Fresh
,
span
:
Arc
::
new
(
jaeger
::
Span
::
Disabled
),
}]
.into
(),
deactivated
:
vec!
[]
.into
(),
}),
OverseerSignal
::
ActiveLeaves
(
ActiveLeavesUpdate
::
start_work
(
ActivatedLeaf
{
hash
:
new_leaf
,
number
:
4
,
status
:
LeafStatus
::
Fresh
,
span
:
Arc
::
new
(
jaeger
::
Span
::
Disabled
),
})),
)
.await
;
assert_matches!
(
...
...
@@ -1139,15 +1133,12 @@ async fn import_leaf(
overseer_signal
(
virtual_overseer
,
OverseerSignal
::
ActiveLeaves
(
ActiveLeavesUpdate
{
activated
:
vec!
[
ActivatedLeaf
{
hash
:
new_leaf
,
number
:
1
,
status
:
LeafStatus
::
Fresh
,
span
:
Arc
::
new
(
jaeger
::
Span
::
Disabled
),
}]
.into
(),
deactivated
:
vec!
[]
.into
(),
}),
OverseerSignal
::
ActiveLeaves
(
ActiveLeavesUpdate
::
start_work
(
ActivatedLeaf
{
hash
:
new_leaf
,
number
:
1
,
status
:
LeafStatus
::
Fresh
,
span
:
Arc
::
new
(
jaeger
::
Span
::
Disabled
),
})),
)
.await
;
assert_matches!
(
...
...
node/network/availability-distribution/Cargo.toml
View file @
b11948c8
...
...
@@ -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"
node/network/availability-distribution/src/tests/state.rs
View file @
b11948c8
...
...
@@ -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
:
small
vec!
[
old
.clone
()],
}
)
,
deactivated
:
vec!
[
old
.clone
()]
.into
()
,
})
.collect
::
<
Vec
<
_
>>
()
};
...
...
node/network/availability-recovery/Cargo.toml
View file @
b11948c8
...
...
@@ -24,7 +24,6 @@ assert_matches = "1.4.0"
env_logger
=
"0.8.4"
futures-timer
=
"3.0.2"
log
=
"0.4.11"
smallvec
=
"1.5.1"
sp-core
=
{
git
=
"https://github.com/paritytech/substrate"
,
branch
=
"master"
}
sp-keyring
=
{
git
=
"https://github.com/paritytech/substrate"
,
branch
=
"master"
}
...
...
node/network/availability-recovery/src/tests.rs
View file @
b11948c8
...
...
@@ -20,7 +20,6 @@ use std::sync::Arc;
use
futures
::{
executor
,
future
};
use
futures_timer
::
Delay
;
use
assert_matches
::
assert_matches
;
use
smallvec
::
smallvec
;
use
parity_scale_codec
::
Encode
;
...
...
@@ -446,15 +445,12 @@ fn availability_is_recovered_from_chunks_if_no_group_provided() {
test_harness_fast_path
(|
mut
virtual_overseer
|
async
move
{
overseer_signal
(
&
mut
virtual_overseer
,
OverseerSignal
::
ActiveLeaves
(
ActiveLeavesUpdate
{
activated
:
smallvec!
[
ActivatedLeaf
{
hash
:
test_state
.current
.clone
(),
number
:
1
,
status
:
LeafStatus
::
Fresh
,
span
:
Arc
::
new
(
jaeger
::
Span
::
Disabled
),
}],
deactivated
:
smallvec!
[],
}),
OverseerSignal
::
ActiveLeaves
(
ActiveLeavesUpdate
::
start_work
(
ActivatedLeaf
{
hash
:
test_state
.current
.clone
(),
number
:
1
,
status
:
LeafStatus
::
Fresh
,
span
:
Arc
::
new
(
jaeger
::
Span
::
Disabled
),
})),
)
.await
;
let
(
tx
,
rx
)
=
oneshot
::
channel
();
...
...
@@ -528,15 +524,12 @@ fn availability_is_recovered_from_chunks_even_if_backing_group_supplied_if_chunk
test_harness_chunks_only
(|
mut
virtual_overseer
|
async
move
{
overseer_signal
(
&
mut
virtual_overseer
,
OverseerSignal
::
ActiveLeaves
(
ActiveLeavesUpdate
{
activated
:
smallvec!
[
ActivatedLeaf
{
hash
:
test_state
.current
.clone
(),
number
:
1
,
status
:
LeafStatus
::
Fresh
,
span
:
Arc
::
new
(
jaeger
::
Span
::
Disabled
),
}],
deactivated
:
smallvec!
[],
}),
OverseerSignal
::
ActiveLeaves
(
ActiveLeavesUpdate
::
start_work
(
ActivatedLeaf
{
hash
:
test_state
.current
.clone
(),
number
:
1
,
status
:
LeafStatus
::
Fresh
,
span
:
Arc
::
new
(
jaeger
::
Span
::
Disabled
),
})),
)
.await
;
let
(
tx
,
rx
)
=
oneshot
::
channel
();
...
...
@@ -610,15 +603,12 @@ fn bad_merkle_path_leads_to_recovery_error() {
test_harness_fast_path
(|
mut
virtual_overseer
|
async
move
{
overseer_signal
(
&
mut
virtual_overseer
,
OverseerSignal
::
ActiveLeaves
(
ActiveLeavesUpdate
{
activated
:
smallvec!
[
ActivatedLeaf
{
hash
:
test_state
.current
.clone
(),
number
:
1
,
status
:
LeafStatus
::
Fresh
,
span
:
Arc
::
new
(
jaeger
::
Span
::
Disabled
),
}],
deactivated
:
smallvec!
[],
}),
OverseerSignal
::
ActiveLeaves
(
ActiveLeavesUpdate
::
start_work
(
ActivatedLeaf
{
hash
:
test_state
.current
.clone
(),
number
:
1
,
status
:
LeafStatus
::
Fresh
,
span
:
Arc
::
new
(
jaeger
::
Span
::
Disabled
),
})),
)
.await
;
let
(
tx
,
rx
)
=
oneshot
::
channel
();
...
...
@@ -667,15 +657,12 @@ fn wrong_chunk_index_leads_to_recovery_error() {
test_harness_fast_path
(|
mut
virtual_overseer
|
async
move
{
overseer_signal
(
&
mut
virtual_overseer
,
OverseerSignal
::
ActiveLeaves
(
ActiveLeavesUpdate
{
activated
:
smallvec!
[
ActivatedLeaf
{
hash
:
test_state
.current
.clone
(),
number
:
1
,
status
:
LeafStatus
::
Fresh
,
span
:
Arc
::
new
(
jaeger
::
Span
::
Disabled
),
}],
deactivated
:
smallvec!
[],
}),
OverseerSignal
::
ActiveLeaves
(
ActiveLeavesUpdate
::
start_work
(
ActivatedLeaf
{
hash
:
test_state
.current
.clone
(),
number
:
1
,
status
:
LeafStatus
::
Fresh
,
span
:
Arc
::
new
(
jaeger
::
Span
::
Disabled
),
})),
)
.await
;
let
(
tx
,
rx
)
=
oneshot
::
channel
();
...
...
@@ -741,15 +728,12 @@ fn invalid_erasure_coding_leads_to_invalid_error() {
overseer_signal
(
&
mut
virtual_overseer
,
OverseerSignal
::
ActiveLeaves
(
ActiveLeavesUpdate
{
activated
:
smallvec!
[
ActivatedLeaf
{
hash
:
test_state
.current
.clone
(),
number
:
1
,
status
:
LeafStatus
::
Fresh
,
span
:
Arc
::
new
(
jaeger
::
Span
::
Disabled
),
}],
deactivated
:
smallvec!
[],
}),
OverseerSignal
::
ActiveLeaves
(
ActiveLeavesUpdate
::
start_work
(
ActivatedLeaf
{
hash
:
test_state
.current
.clone
(),
number
:
1
,
status
:
LeafStatus
::
Fresh
,
span
:
Arc
::
new
(
jaeger
::
Span
::
Disabled
),
})),
)
.await
;
let
(
tx
,
rx
)
=
oneshot
::
channel
();
...
...
@@ -789,15 +773,12 @@ fn fast_path_backing_group_recovers() {
test_harness_fast_path
(|
mut
virtual_overseer
|
async
move
{
overseer_signal
(
&
mut
virtual_overseer
,
OverseerSignal
::
ActiveLeaves
(
ActiveLeavesUpdate
{
activated
:
smallvec!
[
ActivatedLeaf
{
hash
:
test_state
.current
.clone
(),
number
:
1
,
status
:
LeafStatus
::
Fresh
,
span
:
Arc
::
new
(
jaeger
::
Span
::
Disabled
),
}],
deactivated
:
smallvec!
[],
}),
OverseerSignal
::
ActiveLeaves
(
ActiveLeavesUpdate
::
start_work
(
ActivatedLeaf
{
hash
:
test_state
.current
.clone
(),
number
:
1
,
status
:
LeafStatus
::
Fresh
,
span
:
Arc
::
new
(
jaeger
::
Span
::
Disabled
),
})),
)
.await
;
let
(
tx
,
rx
)
=
oneshot
::
channel
();
...
...
@@ -842,15 +823,12 @@ fn no_answers_in_fast_path_causes_chunk_requests() {
test_harness_fast_path
(|
mut
virtual_overseer
|
async
move
{
overseer_signal
(
&
mut
virtual_overseer
,
OverseerSignal
::
ActiveLeaves
(
ActiveLeavesUpdate
{
activated
:
smallvec!
[
ActivatedLeaf
{
hash
:
test_state
.current
.clone
(),
number
:
1
,
status
:
LeafStatus
::
Fresh
,
span
:
Arc
::
new
(
jaeger
::
Span
::
Disabled
),
}],
deactivated
:
smallvec!
[],
}),
OverseerSignal
::
ActiveLeaves
(
ActiveLeavesUpdate
::
start_work
(
ActivatedLeaf
{
hash
:
test_state
.current
.clone
(),
number
:
1
,
status
:
LeafStatus
::
Fresh
,
span
:
Arc
::
new
(
jaeger
::
Span
::
Disabled
),
})),
)
.await
;
let
(
tx
,
rx
)
=
oneshot
::
channel
();
...
...
@@ -905,15 +883,12 @@ fn task_canceled_when_receivers_dropped() {
test_harness_chunks_only
(|
mut
virtual_overseer
|
async
move
{
overseer_signal
(
&
mut
virtual_overseer
,
OverseerSignal
::
ActiveLeaves
(
ActiveLeavesUpdate
{
activated
:
smallvec!
[
ActivatedLeaf
{
hash
:
test_state
.current
.clone
(),
number
:
1
,
status
:
LeafStatus
::
Fresh
,
span
:
Arc
::
new
(
jaeger
::
Span
::
Disabled
),
}],
deactivated
:
smallvec!
[],
}),
OverseerSignal
::
ActiveLeaves
(
ActiveLeavesUpdate
::
start_work
(
ActivatedLeaf
{
hash
:
test_state
.current
.clone
(),
number
:
1
,
status
:
LeafStatus
::
Fresh
,
span
:
Arc
::
new
(
jaeger
::
Span
::
Disabled
),
})),
)
.await
;
let
(
tx
,
_
)
=
oneshot
::
channel
();
...
...
@@ -948,15 +923,12 @@ fn chunks_retry_until_all_nodes_respond() {
test_harness_chunks_only
(|
mut
virtual_overseer
|
async
move
{
overseer_signal
(
&
mut
virtual_overseer
,
OverseerSignal
::
ActiveLeaves
(
ActiveLeavesUpdate
{
activated
:
smallvec!
[
ActivatedLeaf
{
hash
:
test_state
.current
.clone
(),
number
:
1
,
status
:
LeafStatus
::
Fresh
,
span
:
Arc
::
new
(
jaeger
::
Span
::
Disabled
),
}],
deactivated
:
smallvec!
[],
}),
OverseerSignal
::
ActiveLeaves
(
ActiveLeavesUpdate
::
start_work
(
ActivatedLeaf
{
hash
:
test_state
.current
.clone
(),
number
:
1
,
status
:
LeafStatus
::
Fresh
,
span
:
Arc
::
new
(
jaeger
::
Span
::
Disabled
),
})),
)
.await
;
let
(
tx
,
rx
)
=
oneshot
::
channel
();
...
...
@@ -1007,15 +979,12 @@ fn returns_early_if_we_have_the_data() {
test_harness_chunks_only
(|
mut
virtual_overseer
|
async
move
{
overseer_signal
(
&
mut
virtual_overseer
,
OverseerSignal
::
ActiveLeaves
(
ActiveLeavesUpdate
{
activated
:
smallvec!
[
ActivatedLeaf
{
hash
:
test_state
.current
.clone
(),
number
:
1
,
status
:
LeafStatus
::
Fresh
,
span
:
Arc
::
new
(
jaeger
::
Span
::
Disabled
),
}],
deactivated
:
smallvec!
[],
}),
OverseerSignal
::
ActiveLeaves
(
ActiveLeavesUpdate
::
start_work
(
ActivatedLeaf
{
hash
:
test_state
.current
.clone
(),
number
:
1
,
status
:
LeafStatus
::
Fresh
,
span
:
Arc
::
new
(
jaeger
::
Span
::
Disabled
),
})),
)
.await
;
let
(
tx
,
rx
)
=
oneshot
::
channel
();
...
...
@@ -1045,15 +1014,12 @@ fn does_not_query_local_validator() {
test_harness_chunks_only
(|
mut
virtual_overseer
|
async
move
{
overseer_signal
(
&
mut
virtual_overseer
,
OverseerSignal
::
ActiveLeaves
(
ActiveLeavesUpdate
{
activated
:
smallvec!
[
ActivatedLeaf
{
hash
:
test_state
.current
.clone
(),
number
:
1
,
status
:
LeafStatus
::
Fresh
,
span
:
Arc
::
new
(
jaeger
::
Span
::
Disabled
),
}],
deactivated
:
smallvec!
[],
}),
OverseerSignal
::
ActiveLeaves
(
ActiveLeavesUpdate
::
start_work
(
ActivatedLeaf
{
hash
:
test_state
.current
.clone
(),
number
:
1
,
status
:
LeafStatus
::
Fresh
,
span
:
Arc
::
new
(
jaeger
::
Span
::
Disabled
),
})),
)
.await
;
let
(
tx
,
rx
)
=
oneshot
::
channel
();
...
...
node/network/bridge/src/lib.rs
View file @
b11948c8
...
...
@@ -401,7 +401,7 @@ where
tracing
::
trace!
(
target
:
LOG_TARGET
,
action
=
"ActiveLeaves"
,
num
_activated
=
%
activated
.
len
(),
has
_activated
=
activated
.
is_some
(),
num_deactivated
=
%
deactivated
.len
(),
);
...
...
node/network/bridge/src/tests.rs
View file @
b11948c8
...
...
@@ -1336,31 +1336,22 @@ fn our_view_updates_decreasing_order_and_limited_to_max() {
// to show that we're still connected on the collation protocol, send a view update.
let
hashes
=
(
0
..
MAX_VIEW_HEADS
*
3
)
.map
(|
i
|
Hash
::
repeat_byte
(
i
as
u8
));
virtual_overseer
.send
(
FromOverseer
::
Signal
(
OverseerSignal
::
ActiveLeaves
(
//
These are in reverse order, so the subsystem must sort internally to
// get the correct view.
ActiveLeaves
Update
{
a
ctiv
ated
:
hashes
.enumerate
()
.map
(|(
i
,
h
)|
ActivatedLeaf
{
hash
:
h
,
let
hashes
=
(
0
..
MAX_VIEW_HEADS
+
1
)
.map
(|
i
|
Hash
::
repeat_byte
(
i
as
u8
));
for
(
i
,
hash
)
in
hashes
.enumerate
()
.rev
()
{
// These are in reverse order, so the subsystem must sort internally to
//
get the correct view.
virtual_overseer
.send
(
FromOverseer
::
Signal
(
OverseerSignal
::
ActiveLeaves
(
A
ctiv
eLeavesUpdate
::
start_work
(
ActivatedLeaf
{
hash
,
number
:
i
as
_
,
status
:
LeafStatus
::
Fresh
,
span
:
Arc
::
new
(
jaeger
::
Span
::
Disabled
),
})
.rev
()
.collect
(),
deactivated
:
Default
::
default
(),
}
))
)
.await
;
let
view_heads
=
(
MAX_VIEW_HEADS
*
2
..
MAX_VIEW_HEADS
*
3
)
.rev
()
.map
(|
i
|
(
Hash
::
repeat_byte
(
i
as
u8
),
Arc
::
new
(
jaeger
::
Span
::
Disabled
))
);
let
our_view
=
OurView
::
new
(
view_heads
,
0
,
);
}),
))
)
.await
;
}
assert_matches!
(
virtual_overseer
.recv
()
.await
,
...
...
@@ -1375,15 +1366,26 @@ fn our_view_updates_decreasing_order_and_limited_to_max() {
)
);
assert_sends_validation_event_to_all
(
NetworkBridgeEvent
::
OurViewChange
(
our_view
.clone
()),
&
mut
virtual_overseer
,
)
.await
;
let
our_views
=
(
1
..=
MAX_VIEW_HEADS
)
.rev
()
.map
(|
start
|
OurView
::
new
(
(
start
..=
MAX_VIEW_HEADS
)
.rev
()
.map
(|
i
|
(
Hash
::
repeat_byte
(
i
as
u8
),
Arc
::
new
(
jaeger
::
Span
::
Disabled
))),
0
,
));
for
our_view
in
our_views
{
assert_sends_validation_event_to_all
(
NetworkBridgeEvent
::
OurViewChange
(
our_view
.clone
()),
&
mut
virtual_overseer
,
)
.await
;
assert_sends_collation_event_to_all
(
NetworkBridgeEvent
::
OurViewChange
(
our_view
),
&
mut
virtual_overseer
,
)
.await
;
}
assert_sends_collation_event_to_all
(
NetworkBridgeEvent
::
OurViewChange
(
our_view
),
&
mut
virtual_overseer
,
)
.await
;
virtual_overseer
});
}
node/network/collator-protocol/src/collator_side/tests.rs
View file @
b11948c8
...
...
@@ -286,15 +286,12 @@ async fn setup_system(virtual_overseer: &mut VirtualOverseer, test_state: &TestS
overseer_signal
(
virtual_overseer
,
OverseerSignal
::
ActiveLeaves
(
ActiveLeavesUpdate
{
activated
:
vec!
[
ActivatedLeaf
{
hash
:
test_state
.relay_parent
,
number
:
1
,
status
:
LeafStatus
::
Fresh
,
span
:
Arc
::
new
(
jaeger
::
Span
::
Disabled
),
}]
.into
(),
deactivated
:
[][
..
]
.into
(),
}),
OverseerSignal
::
ActiveLeaves
(
ActiveLeavesUpdate
::
start_work
(
ActivatedLeaf
{
hash
:
test_state
.relay_parent
,
number
:
1
,
status
:
LeafStatus
::
Fresh
,
span
:
Arc
::
new
(
jaeger
::
Span
::
Disabled
),
})),
)
.await
;
overseer_send
(
...
...
@@ -579,7 +576,7 @@ fn advertise_and_send_collation() {
assert_matches!
(
overseer_recv
(
&
mut
virtual_overseer
)
.await
,
AllMessages
::
NetworkBridge
(
NetworkBridgeMessage
::
ReportPeer
(
bad_peer
,
_
))
=>
{
assert_eq!
(
bad_peer
,
peer
);
assert_eq!
(
bad_peer
,
peer
);
}
);
assert_matches!
(
...
...
node/network/dispute-distribution/src/tests/mod.rs
View file @
b11948c8
...
...
@@ -615,16 +615,14 @@ async fn activate_leaf(
handle
.send
(
FromOverseer
::
Signal
(
OverseerSignal
::
ActiveLeaves
(
ActiveLeavesUpdate
{
activated
:
[
ActivatedLeaf
{
hash
:
activate
,
number
:
10
,
status
:
LeafStatus
::
Fresh
,
span
:
Arc
::
new
(
Span
::
Disabled
),
}][
..
]
.into
(),
activated
:
Some
(
ActivatedLeaf
{
hash
:
activate
,
number
:
10
,
status
:
LeafStatus
::
Fresh
,
span
:
Arc
::
new
(
Span
::
Disabled
),
}),
deactivated
:
deactivate
.into_iter
()
.collect
(),
}
)))
.await
;
assert_matches!
(
...
...
node/network/statement-distribution/src/tests.rs
View file @
b11948c8
...
...
@@ -652,15 +652,14 @@ fn receiving_from_one_sends_to_another_and_to_candidate_backing() {
let
test_fut
=
async
move
{
// register our active heads.
handle
.send
(
FromOverseer
::
Signal
(
OverseerSignal
::
ActiveLeaves
(
ActiveLeavesUpdate
{
activated
:
vec!
[
ActivatedLeaf
{
handle
.send
(
FromOverseer
::
Signal
(
OverseerSignal
::
ActiveLeaves
(
ActiveLeavesUpdate
::
start_work
(
ActivatedLeaf
{
hash
:
hash_a
,
number
:
1
,
status
:
LeafStatus
::
Fresh
,
span
:
Arc
::
new
(
jaeger
::
Span
::
Disabled
),
}]
.into
(),
deactivated
:
vec!
[]
.into
(),
})))
.await
;
})),
))
.await
;
assert_matches!
(
handle
.recv
()
.await
,
...
...
@@ -828,15 +827,14 @@ fn receiving_large_statement_from_one_sends_to_another_and_to_candidate_backing(
})
.await
;
// register our active heads.
handle
.send
(
FromOverseer
::
Signal
(
OverseerSignal
::
ActiveLeaves
(
ActiveLeavesUpdate
{
activated
:
vec!
[
ActivatedLeaf
{
handle
.send
(
FromOverseer
::
Signal
(
OverseerSignal
::
ActiveLeaves
(
ActiveLeavesUpdate
::
start_work
(
ActivatedLeaf
{
hash
:
hash_a
,
number
:
1
,
status
:
LeafStatus
::
Fresh
,
span
:
Arc
::
new
(
jaeger
::
Span
::
Disabled
),
}]
.into
(),
deactivated
:
vec!
[]
.into
(),
})))
.await
;
})),
))
.await
;
assert_matches!
(
handle
.recv
()
.await
,
...
...
@@ -1300,15 +1298,14 @@ fn share_prioritizes_backing_group() {
})
.await
;
// register our active heads.
handle
.send
(
FromOverseer
::
Signal
(
OverseerSignal
::
ActiveLeaves
(
ActiveLeavesUpdate
{
activated
:
vec!
[
ActivatedLeaf
{
handle
.send
(
FromOverseer
::
Signal
(
OverseerSignal
::
ActiveLeaves
(
ActiveLeavesUpdate
::
start_work
(
ActivatedLeaf
{
hash
:
hash_a
,
number
:
1
,
status
:
LeafStatus
::
Fresh
,
span
:
Arc
::
new
(
jaeger
::
Span
::
Disabled
),
}]
.into
(),
deactivated
:
vec!
[]
.into
(),
})))
.await
;
})),
))
.await
;
assert_matches!
(
handle
.recv
()
.await
,
...
...
@@ -1556,15 +1553,14 @@ fn peer_cant_flood_with_large_statements() {
})
.await
;
// register our active heads.
handle
.send
(
FromOverseer
::
Signal
(
OverseerSignal
::
ActiveLeaves
(
ActiveLeavesUpdate
{
activated
:
vec!
[
ActivatedLeaf
{
handle
.send
(
FromOverseer
::
Signal
(
OverseerSignal
::
ActiveLeaves
(
ActiveLeavesUpdate
::
start_work
(
ActivatedLeaf
{
hash
:
hash_a
,
number
:
1
,
status
:
LeafStatus
::
Fresh
,
span
:
Arc
::
new
(
jaeger
::
Span
::
Disabled
),
}]
.into
(),
deactivated
:
vec!
[]
.into
(),
})))
.await
;
})),
))
.await
;
assert_matches!
(
handle
.recv
()
.await
,
...
...
node/overseer/src/lib.rs
View file @
b11948c8
...
...
@@ -706,31 +706,27 @@ where
/// Stop the overseer.
async
fn
stop
(
mut
self
)
{