mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-30 16:37:57 +00:00
Finality notification streams (#791)
* finalization for in_mem * fetch last finalized block * pruning: use canonical term instead of final * finalize blocks in full node * begin to port light client DB * add tree-route * keep number index consistent in full nodes * fix tests * disable cache and finish porting light client * add AsMut to system module * final leaf is always best * fix all tests * Fix comment and trace * removed unused Into call * add comment on behavior of `finalize_block` * move `tree_route` to client common * tree_route tests * return slices in TreeRoute * apply finality up to parent * add `finalize_block` call * adjust formatting * finality notifications and add last finalized block to chain info * exhaustive match and comments * fix sync tests by using non-instant finality
This commit is contained in:
committed by
Arkadiy Paronyan
parent
ef97973178
commit
b02c274374
@@ -99,6 +99,18 @@ error_chain! {
|
||||
description("Error decoding call result")
|
||||
display("Error decoding call result of {}", method)
|
||||
}
|
||||
|
||||
/// Last finalized block not parent of current.
|
||||
NonSequentialFinalization(s: String) {
|
||||
description("Did not finalize blocks in sequential order."),
|
||||
display("Did not finalize blocks in sequential order."),
|
||||
}
|
||||
|
||||
/// Safety violation: new best block not descendent of last finalized.
|
||||
NotInFinalizedChain {
|
||||
description("Potential long-range attack: block not in finalized chain."),
|
||||
display("Potential long-range attack: block not in finalized chain."),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user