mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-19 05:21:03 +00:00
Enrich TooManySiblingBlocks error info (#13052)
This commit is contained in:
@@ -283,7 +283,12 @@ impl<BlockHash: Hash, Key: Hash> NonCanonicalOverlay<BlockHash, Key> {
|
||||
};
|
||||
|
||||
if level.blocks.len() >= MAX_BLOCKS_PER_LEVEL as usize {
|
||||
return Err(StateDbError::TooManySiblingBlocks)
|
||||
trace!(
|
||||
target: "state-db",
|
||||
"Too many sibling blocks at #{number}: {:?}",
|
||||
level.blocks.iter().map(|b| &b.hash).collect::<Vec<_>>()
|
||||
);
|
||||
return Err(StateDbError::TooManySiblingBlocks { number })
|
||||
}
|
||||
if level.blocks.iter().any(|b| b.hash == *hash) {
|
||||
return Err(StateDbError::BlockAlreadyExists)
|
||||
|
||||
Reference in New Issue
Block a user