Unverified Commit 2f2959d0 authored by John Chase's avatar John Chase Committed by GitHub

core/state/pruner: remove unused error-return (#27273)

parent eb83e7c5
...@@ -127,6 +127,6 @@ func (bloom *stateBloom) Delete(key []byte) error { panic("not supported") } ...@@ -127,6 +127,6 @@ func (bloom *stateBloom) Delete(key []byte) error { panic("not supported") }
// reports whether the key is contained. // reports whether the key is contained.
// - If it says yes, the key may be contained // - If it says yes, the key may be contained
// - If it says no, the key is definitely not contained. // - If it says no, the key is definitely not contained.
func (bloom *stateBloom) Contain(key []byte) (bool, error) { func (bloom *stateBloom) Contain(key []byte) bool {
return bloom.bloom.Contains(stateBloomHasher(key)), nil return bloom.bloom.Contains(stateBloomHasher(key))
} }
...@@ -146,9 +146,7 @@ func prune(snaptree *snapshot.Tree, root common.Hash, maindb ethdb.Database, sta ...@@ -146,9 +146,7 @@ func prune(snaptree *snapshot.Tree, root common.Hash, maindb ethdb.Database, sta
if _, exist := middleStateRoots[common.BytesToHash(checkKey)]; exist { if _, exist := middleStateRoots[common.BytesToHash(checkKey)]; exist {
log.Debug("Forcibly delete the middle state roots", "hash", common.BytesToHash(checkKey)) log.Debug("Forcibly delete the middle state roots", "hash", common.BytesToHash(checkKey))
} else { } else {
if ok, err := stateBloom.Contain(checkKey); err != nil { if stateBloom.Contain(checkKey) {
return err
} else if ok {
continue continue
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment