refactor View to include finalized_number (#2128)

* refactor View to include finalized_number

* guide: update the NetworkBridge on BlockFinalized

* av-store: fix the tests

* actually fix tests

* grumbles

* ignore macro doctest

* use Hash::repeat_bytes more consistently

* broadcast empty leaves updates as well

* fix issuing view updates on empty leaves updates
This commit is contained in:
Andronik Ordian
2020-12-17 18:50:58 +01:00
committed by GitHub
parent 1aa2554000
commit 3f5156e866
24 changed files with 249 additions and 196 deletions
+3 -3
View File
@@ -28,7 +28,7 @@ use futures::prelude::*;
use futures::channel::{mpsc, oneshot};
use futures::future::BoxFuture;
use polkadot_primitives::v1::Hash;
use polkadot_primitives::v1::{Hash, BlockNumber};
use async_trait::async_trait;
use smallvec::SmallVec;
@@ -89,8 +89,8 @@ impl PartialEq for ActiveLeavesUpdate {
pub enum OverseerSignal {
/// Subsystems should adjust their jobs to start and stop work on appropriate block hashes.
ActiveLeaves(ActiveLeavesUpdate),
/// `Subsystem` is informed of a finalized block by its block hash.
BlockFinalized(Hash),
/// `Subsystem` is informed of a finalized block by its block hash and number.
BlockFinalized(Hash, BlockNumber),
/// Conclude the work of the `Overseer` and all `Subsystem`s.
Conclude,
}