mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-25 14:16:44 +00:00
trie: make deletion of Trie more readable when match shortNode
This commit is contained in:
parent
0287666b7d
commit
1699154a55
1 changed files with 1 additions and 1 deletions
|
|
@ -452,7 +452,7 @@ func (t *Trie) delete(n node, prefix, key []byte) (bool, node, error) {
|
||||||
// from the subtrie. Child can never be nil here since the
|
// from the subtrie. Child can never be nil here since the
|
||||||
// subtrie must contain at least two other values with keys
|
// subtrie must contain at least two other values with keys
|
||||||
// longer than n.Key.
|
// longer than n.Key.
|
||||||
dirty, child, err := t.delete(n.Val, append(prefix, key[:len(n.Key)]...), key[len(n.Key):])
|
dirty, child, err := t.delete(n.Val, append(prefix, key[:matchlen]...), key[matchlen:])
|
||||||
if !dirty || err != nil {
|
if !dirty || err != nil {
|
||||||
return false, n, err
|
return false, n, err
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue