mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-21 22:24:32 +00:00
parent
cb338be877
commit
3d69b27ae4
2 changed files with 14 additions and 8 deletions
|
|
@ -367,11 +367,12 @@ func unset(parent node, child node, key []byte, pos int, removeLeft bool) error
|
|||
// branch. The parent must be a fullnode.
|
||||
fn := parent.(*fullNode)
|
||||
fn.Children[key[pos-1]] = nil
|
||||
} else {
|
||||
// The key of fork shortnode is greater than the
|
||||
// path(it doesn't belong to the range), keep
|
||||
// it with the cached hash available.
|
||||
}
|
||||
//else {
|
||||
// The key of fork shortnode is greater than the
|
||||
// path(it doesn't belong to the range), keep
|
||||
// it with the cached hash available.
|
||||
//}
|
||||
} else {
|
||||
if bytes.Compare(cld.Key, key[pos:]) > 0 {
|
||||
// The key of fork shortnode is greater than the
|
||||
|
|
@ -379,11 +380,12 @@ func unset(parent node, child node, key []byte, pos int, removeLeft bool) error
|
|||
// branch. The parent must be a fullnode.
|
||||
fn := parent.(*fullNode)
|
||||
fn.Children[key[pos-1]] = nil
|
||||
} else {
|
||||
// The key of fork shortnode is less than the
|
||||
// path(it doesn't belong to the range), keep
|
||||
// it with the cached hash available.
|
||||
}
|
||||
//else {
|
||||
// The key of fork shortnode is less than the
|
||||
// path(it doesn't belong to the range), keep
|
||||
// it with the cached hash available.
|
||||
//}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@ func newTracer() *tracer {
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
// onRead tracks the newly loaded trie node and caches the rlp-encoded blob internally.
|
||||
// Don't change the value outside of function since it's not deep-copied.
|
||||
func (t *tracer) onRead(key []byte, val []byte) {
|
||||
|
|
@ -59,6 +60,7 @@ func (t *tracer) onRead(key []byte, val []byte) {
|
|||
}
|
||||
t.origin[string(key)] = val
|
||||
}
|
||||
*/
|
||||
|
||||
// onInsert tracks the newly inserted trie node. If it's already in the deletion set
|
||||
// (resurrected node), then just wipe it from the deletion set as the "untouched".
|
||||
|
|
@ -115,6 +117,7 @@ func (t *tracer) deleteList() [][]byte {
|
|||
return ret
|
||||
}
|
||||
|
||||
/*
|
||||
// getPrev returns the cached original value of the specified node.
|
||||
func (t *tracer) getPrev(key []byte) []byte {
|
||||
// Don't panic on uninitialized tracer, it's possible in testing.
|
||||
|
|
@ -123,6 +126,7 @@ func (t *tracer) getPrev(key []byte) []byte {
|
|||
}
|
||||
return t.origin[string(key)]
|
||||
}
|
||||
*/
|
||||
|
||||
// reset clears the content tracked by tracer.
|
||||
func (t *tracer) reset() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue