remove on_exit from grandpa (#5098)

This commit is contained in:
Gavin Wood
2020-03-05 13:38:16 +01:00
committed by GitHub
parent 91b44299d8
commit ab58a08a53
5 changed files with 7 additions and 30 deletions
@@ -190,17 +190,6 @@ impl TestNetFactory for GrandpaTestNet {
}
}
#[derive(Clone)]
struct Exit;
impl futures::Future for Exit {
type Output = ();
fn poll(self: Pin<&mut Self>, _: &mut task::Context) -> task::Poll<()> {
task::Poll::Pending
}
}
#[derive(Default, Clone)]
pub(crate) struct TestApi {
genesis_authorities: AuthorityList,
@@ -444,7 +433,6 @@ fn run_to_completion_with<F>(
link: link,
network: net_service,
inherent_data_providers: InherentDataProviders::new(),
on_exit: Exit,
telemetry_on_connect: None,
voting_rule: (),
prometheus_registry: None,
@@ -576,7 +564,6 @@ fn finalize_3_voters_1_full_observer() {
link: link,
network: net_service,
inherent_data_providers: InherentDataProviders::new(),
on_exit: Exit,
telemetry_on_connect: None,
voting_rule: (),
prometheus_registry: None,
@@ -740,7 +727,6 @@ fn transition_3_voters_twice_1_full_observer() {
link: link,
network: net_service,
inherent_data_providers: InherentDataProviders::new(),
on_exit: Exit,
telemetry_on_connect: None,
voting_rule: (),
prometheus_registry: None,
@@ -1166,7 +1152,6 @@ fn voter_persists_its_votes() {
link,
network: this.net.lock().peers[0].network_service().clone(),
inherent_data_providers: InherentDataProviders::new(),
on_exit: Exit,
telemetry_on_connect: None,
voting_rule: VotingRulesBuilder::default().build(),
prometheus_registry: None,
@@ -1382,7 +1367,6 @@ fn finalize_3_voters_1_light_observer() {
},
link,
net.lock().peers[3].network_service().clone(),
Exit,
).unwrap()
);
@@ -1512,7 +1496,6 @@ fn voter_catches_up_to_latest_round_when_behind() {
link,
network: net.lock().peer(peer_id).network_service().clone(),
inherent_data_providers: InherentDataProviders::new(),
on_exit: Exit,
telemetry_on_connect: None,
voting_rule: (),
prometheus_registry: None,