mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-09 20:11:09 +00:00
Fixed state-db block insertion and added forks trace (#1657)
This commit is contained in:
committed by
Gav Wood
parent
ecdd33a367
commit
1ea56905cf
@@ -292,6 +292,13 @@ impl<BlockHash: Hash, Key: Hash> StateDbSync<BlockHash, Key> {
|
||||
if let Some(pruning) = &mut self.pruning {
|
||||
pruning.apply_pending();
|
||||
}
|
||||
trace!(target: "forks", "First available: {:?} ({}), Last canon: {:?} ({}), Best forks: {:?}",
|
||||
self.pruning.as_ref().and_then(|p| p.next_hash()),
|
||||
self.pruning.as_ref().map(|p| p.pending()).unwrap_or(0),
|
||||
self.non_canonical.last_canonicalized_hash(),
|
||||
self.non_canonical.last_canonicalized_block_number().unwrap_or(0),
|
||||
self.non_canonical.top_level(),
|
||||
);
|
||||
}
|
||||
|
||||
pub fn revert_pending(&mut self) {
|
||||
|
||||
Reference in New Issue
Block a user