mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 01:11:10 +00:00
grandpa: pluggable voting rules (#3673)
* grandpa: support pluggable custom voting rules * grandpa: add docs to grandpa voting rule * grandpa: make voting rule mandatory * grandpa: add test for voting rule * node: add GRANDPA voting rule * grandpa: pass backend to VotingRule * core: fix docs in SelectChain::finality_target * grandpa: implement 3/4 of unfinalized chain restriction as voting rule * grandpa: rename AlwaysBehindBestBlock voting rule * grandpa: fix tests * grandpa: remove useless test * grandpa: extend environemnt voting rule test * grandpa: add proofs to unreachable statements * grandpa: fix typo * grandpa: fix docs
This commit is contained in:
committed by
Robert Habermeier
parent
35f8cd19cb
commit
356015e450
@@ -42,8 +42,9 @@ pub trait SelectChain<Block: BlockT>: Sync + Send + Clone {
|
||||
/// best chain to author new blocks upon and probably finalize.
|
||||
fn best_chain(&self) -> Result<<Block as BlockT>::Header, Error>;
|
||||
|
||||
/// Get the best ancestor of `target_hash` that we should attempt
|
||||
/// to finalize next.
|
||||
/// Get the best descendent of `target_hash` that we should attempt to
|
||||
/// finalize next, if any. It is valid to return the given `target_hash`
|
||||
/// itself if no better descendent exists.
|
||||
fn finality_target(
|
||||
&self,
|
||||
target_hash: <Block as BlockT>::Hash,
|
||||
|
||||
Reference in New Issue
Block a user