wtxmgr: ignore ErrBucketNotFound error upon locked outputs bucket deletion
This error would be seen when an old wallet that has yet to update is performing the latest wtxmgr migration. It's possible for the locked outputs bucket to not exist if outputs haven't been locked before, so we should its deletion correctly.
This commit is contained in:
parent
415f37ff11
commit
690a12fa8b
1 changed files with 2 additions and 1 deletions
|
@ -1543,7 +1543,8 @@ func deleteBuckets(ns walletdb.ReadWriteBucket) error {
|
||||||
str := "failed to delete unmined inputs bucket"
|
str := "failed to delete unmined inputs bucket"
|
||||||
return storeError(ErrDatabase, str, err)
|
return storeError(ErrDatabase, str, err)
|
||||||
}
|
}
|
||||||
if err := ns.DeleteNestedBucket(bucketLockedOutputs); err != nil {
|
err := ns.DeleteNestedBucket(bucketLockedOutputs)
|
||||||
|
if err != nil && err != walletdb.ErrBucketNotFound {
|
||||||
str := "failed to delete locked outputs bucket"
|
str := "failed to delete locked outputs bucket"
|
||||||
return storeError(ErrDatabase, str, err)
|
return storeError(ErrDatabase, str, err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue