Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Commit d0cfc38

Browse files
committed
chain: fix error checks
Signed-off-by: Gyuho Lee <[email protected]>
1 parent a16f187 commit d0cfc38

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

chain/storage_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ package chain
55

66
import (
77
"bytes"
8+
"errors"
89
"fmt"
910
reflect "reflect"
1011
"testing"
@@ -114,7 +115,7 @@ func TestPutPrefixInfoAndKey(t *testing.T) {
114115
if ok, err := HasPrefixKey(db, pfx, k); ok || err != nil {
115116
t.Fatalf("unexpected ok %v, err %v", ok, err)
116117
}
117-
if err := PutPrefixKey(db, pfx, k, v); err != ErrPrefixMissing {
118+
if err := PutPrefixKey(db, pfx, k, v); !errors.Is(err, ErrPrefixMissing) {
118119
t.Fatalf("unexpected error %v, expected %v", err, ErrPrefixMissing)
119120
}
120121

0 commit comments

Comments
 (0)