Skip to content

Commit 2f2959d

Browse files
authored
core/state/pruner: remove unused error-return (#27273)
1 parent eb83e7c commit 2f2959d

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

core/state/pruner/bloom.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,6 @@ func (bloom *stateBloom) Delete(key []byte) error { panic("not supported") }
127127
// reports whether the key is contained.
128128
// - If it says yes, the key may be contained
129129
// - If it says no, the key is definitely not contained.
130-
func (bloom *stateBloom) Contain(key []byte) (bool, error) {
131-
return bloom.bloom.Contains(stateBloomHasher(key)), nil
130+
func (bloom *stateBloom) Contain(key []byte) bool {
131+
return bloom.bloom.Contains(stateBloomHasher(key))
132132
}

core/state/pruner/pruner.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,7 @@ func prune(snaptree *snapshot.Tree, root common.Hash, maindb ethdb.Database, sta
146146
if _, exist := middleStateRoots[common.BytesToHash(checkKey)]; exist {
147147
log.Debug("Forcibly delete the middle state roots", "hash", common.BytesToHash(checkKey))
148148
} else {
149-
if ok, err := stateBloom.Contain(checkKey); err != nil {
150-
return err
151-
} else if ok {
149+
if stateBloom.Contain(checkKey) {
152150
continue
153151
}
154152
}

0 commit comments

Comments
 (0)