You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
t.Iterate(func(key []byte, val []byte) (stopbool) { //nolint:errcheck
However, the only reason an error can be returned is if IsFastCacheEnabled returns an error, which supposedly is very rare.
A better API is to fall back to NewIterator when IsFastCacheEnabled fails and remove the error result. This benefits every caller, direct and indirect.
Right now every caller of
ImmutableTree.Iterator
must handle itserror
result, which in turn leads to errors being ignored:iavl/immutable_tree.go
Line 49 in 64ffc27
However, the only reason an error can be returned is if
IsFastCacheEnabled
returns an error, which supposedly is very rare.A better API is to fall back to
NewIterator
whenIsFastCacheEnabled
fails and remove theerror
result. This benefits every caller, direct and indirect.CC @odeke-em
The text was updated successfully, but these errors were encountered: