loopdb: switch to go.etcd.io/bbolt

github.com/coreos/bbolt has race conditions:
https://github.com/golang/go/issues/54690
This commit is contained in:
Boris Nagaev 2025-03-10 18:00:07 -03:00 committed by Slyghtning
parent d2c08bbb51
commit 2249c41d2f
No known key found for this signature in database
GPG key ID: F82D456EA023C9BF
13 changed files with 12 additions and 15 deletions

View file

@ -6,9 +6,9 @@ import (
"fmt"
"time"
"github.com/coreos/bbolt"
"github.com/lightninglabs/loop/labels"
"github.com/lightningnetwork/lnd/routing/route"
"go.etcd.io/bbolt"
)
// LoopInContract contains the data that is serialized to persistent storage for

View file

@ -5,7 +5,7 @@ import (
"fmt"
"github.com/btcsuite/btcd/chaincfg"
"github.com/coreos/bbolt"
"go.etcd.io/bbolt"
)
var (

View file

@ -5,7 +5,7 @@ import (
"fmt"
"github.com/btcsuite/btcd/chaincfg"
"github.com/coreos/bbolt"
"go.etcd.io/bbolt"
)
// noMigrationAvailable is the fall back migration in case there is no migration

View file

@ -6,7 +6,7 @@ import (
"fmt"
"github.com/btcsuite/btcd/chaincfg"
"github.com/coreos/bbolt"
"go.etcd.io/bbolt"
)
// migrateSwapPublicationDeadline migrates the database to v02, by adding the

View file

@ -6,7 +6,7 @@ import (
"fmt"
"github.com/btcsuite/btcd/chaincfg"
"github.com/coreos/bbolt"
"go.etcd.io/bbolt"
)
// migrateLastHop migrates the database to v03, replacing the never used loop in

View file

@ -5,7 +5,7 @@ import (
"fmt"
"github.com/btcsuite/btcd/chaincfg"
"github.com/coreos/bbolt"
"go.etcd.io/bbolt"
)
// migrateUpdates migrates the swap updates to add an additional level of

View file

@ -8,8 +8,8 @@ import (
"testing"
"github.com/btcsuite/btcd/chaincfg"
"github.com/coreos/bbolt"
"github.com/stretchr/testify/require"
"go.etcd.io/bbolt"
)
// TestMigrationUpdates asserts that the swap updates migration is carried out

View file

@ -5,7 +5,7 @@ import (
"fmt"
"strings"
"github.com/coreos/bbolt"
"go.etcd.io/bbolt"
)
// DumpDB dumps go code describing the contents of the database to stdout. This

View file

@ -13,8 +13,8 @@ import (
"github.com/btcsuite/btcd/chaincfg"
"github.com/btcsuite/btcd/chaincfg/chainhash"
"github.com/coreos/bbolt"
"github.com/lightningnetwork/lnd/lntypes"
"go.etcd.io/bbolt"
)
var (

View file

@ -11,12 +11,12 @@ import (
"github.com/btcsuite/btcd/chaincfg"
"github.com/btcsuite/btcd/chaincfg/chainhash"
"github.com/coreos/bbolt"
"github.com/lightninglabs/loop/test"
"github.com/lightningnetwork/lnd/keychain"
"github.com/lightningnetwork/lnd/lntypes"
"github.com/lightningnetwork/lnd/routing/route"
"github.com/stretchr/testify/require"
"go.etcd.io/bbolt"
)
var (