Quickfix for possible IndexError in state network recursive gossip (#2052)

This would currently manifest sometimes in state gossip test in
CI or locally. But could occur on fluffy binary in case state
network  is enable and data is gossiped.
This commit is contained in:
Kim De Mey 2024-02-27 17:39:23 +01:00 committed by GitHub
parent d830692b72
commit b656875778
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 0 deletions

View File

@ -187,6 +187,11 @@ proc recursiveGossipAccountTrieNode(
nibbles = decodedKey.accountTrieNodeKey.path.unpackNibbles()
proof = decodedValue.proof
# When nibbles is empty this means the root node was received. Recursive
# gossiping is finished.
if nibbles.len() == 0:
return
discard nibbles.pop()
discard (distinctBase proof).pop()
let