mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-17 17:11:02 +00:00
preserve finalized block in active leaves (#3997)
This commit is contained in:
committed by
GitHub
parent
679c51eb57
commit
c48b2f08ad
@@ -674,7 +674,9 @@ where
|
||||
let mut update = ActiveLeavesUpdate::default();
|
||||
|
||||
self.active_leaves.retain(|h, n| {
|
||||
if *n <= block.number {
|
||||
// prune all orphaned leaves, but don't prune
|
||||
// the finalized block if it is itself a leaf.
|
||||
if *n <= block.number && *h != block.hash {
|
||||
update.deactivated.push(*h);
|
||||
false
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user