refactor: remove directive errors comparison (#20344)
This commit is contained in:
@@ -874,7 +874,7 @@ func (rs *Store) Snapshot(height uint64, protoWriter protoio.Writer) error {
|
||||
nodeCount := 0
|
||||
for {
|
||||
node, err := exporter.Next()
|
||||
if err == iavltree.ErrorExportDone {
|
||||
if errors.Is(err, iavltree.ErrorExportDone) {
|
||||
rs.logger.Debug("snapshot Done", "store", store.name, "nodeCount", nodeCount)
|
||||
break
|
||||
} else if err != nil {
|
||||
@@ -920,7 +920,7 @@ loop:
|
||||
for {
|
||||
snapshotItem = snapshottypes.SnapshotItem{}
|
||||
err := protoReader.ReadMsg(&snapshotItem)
|
||||
if err == io.EOF {
|
||||
if errors.Is(err, io.EOF) {
|
||||
break
|
||||
} else if err != nil {
|
||||
return snapshottypes.SnapshotItem{}, errorsmod.Wrap(err, "invalid protobuf message")
|
||||
|
||||
Reference in New Issue
Block a user