Skip to content

Commit 070d45c

Browse files
committed
Fix bbolt.ErrTimeout deprecation warning
- Use errors.Is() for bbolt.ErrTimeout comparison in loopdb/store.go - Fixes SA1019: bbolt.ErrTimeout is deprecated warning
1 parent f6a6648 commit 070d45c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

loopdb/store.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ func NewBoltSwapStore(dbPath string, chainParams *chaincfg.Params) (
194194
bdb, err := bbolt.Open(path, 0600, &bbolt.Options{
195195
Timeout: DefaultLoopDBTimeout,
196196
})
197-
if err == bbolt.ErrTimeout {
197+
if errors.Is(err, bbolt.ErrTimeout) {
198198
return nil, fmt.Errorf("%w: couldn't obtain exclusive lock on "+
199199
"%s, timed out after %v", bbolt.ErrTimeout, path,
200200
DefaultLoopDBTimeout)

0 commit comments

Comments
 (0)