Register previous rounds' votes with gossip service on startup (#2676)

* grandpa: register previous round votes with gossip service on startup

* gossip: fix tests

* grandpa: optionally register previous round votes on startup

* grandpa: fix tests
This commit is contained in:
André Silva
2019-05-26 22:05:02 +01:00
committed by Arkadiy Paronyan
parent e2d1d0c951
commit 10c1dfcffb
7 changed files with 119 additions and 19 deletions
@@ -101,6 +101,10 @@ impl<Block: BlockT> CompletedRounds<Block> {
CompletedRounds { inner }
}
pub fn iter(&self) -> impl Iterator<Item=&CompletedRound<Block>> {
self.inner.iter()
}
/// Returns the last (latest) completed round.
pub fn last(&self) -> &CompletedRound<Block> {
self.inner.back()