loopd: fix errors.Is argument order

This commit is contained in:
Slyghtning 2025-12-11 15:21:31 +01:00
parent 5ec5875dd7
commit f4e7e676d4
No known key found for this signature in database
GPG key ID: F82D456EA023C9BF
2 changed files with 5 additions and 5 deletions

View file

@ -194,7 +194,7 @@ func NewBoltSwapStore(dbPath string, chainParams *chaincfg.Params) (
bdb, err := bbolt.Open(path, 0600, &bbolt.Options{
Timeout: DefaultLoopDBTimeout,
})
if err == bbolt.ErrTimeout {
if errors.Is(err, bbolt.ErrTimeout) {
return nil, fmt.Errorf("%w: couldn't obtain exclusive lock on "+
"%s, timed out after %v", bbolt.ErrTimeout, path,
DefaultLoopDBTimeout)