mpt: fix extension node cache invalidation
It should always be invalidated if something changes in the `next` (below the extension node). Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
0e29382035
commit
caea6d6ca8
1 changed files with 1 additions and 1 deletions
|
@ -261,7 +261,6 @@ func (t *Trie) deleteFromExtension(n *ExtensionNode, path []byte) (Node, error)
|
|||
case *ExtensionNode:
|
||||
n.key = append(n.key, nxt.key...)
|
||||
n.next = nxt.next
|
||||
n.invalidateCache()
|
||||
case *HashNode:
|
||||
if nxt.IsEmpty() {
|
||||
return nxt, nil
|
||||
|
@ -269,6 +268,7 @@ func (t *Trie) deleteFromExtension(n *ExtensionNode, path []byte) (Node, error)
|
|||
default:
|
||||
n.next = r
|
||||
}
|
||||
n.invalidateCache()
|
||||
return n, nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue