mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-12-09 20:33:45 +01:00
lnd: convert to use new kvdb abstraction
This commit is contained in:
@@ -23,7 +23,6 @@ import (
|
||||
"github.com/btcsuite/btcd/txscript"
|
||||
"github.com/btcsuite/btcd/wire"
|
||||
"github.com/btcsuite/btcutil"
|
||||
"github.com/coreos/bbolt"
|
||||
"github.com/go-errors/errors"
|
||||
sphinx "github.com/lightningnetwork/lightning-onion"
|
||||
"github.com/lightningnetwork/lnd/autopilot"
|
||||
@@ -32,6 +31,7 @@ import (
|
||||
"github.com/lightningnetwork/lnd/chanbackup"
|
||||
"github.com/lightningnetwork/lnd/chanfitness"
|
||||
"github.com/lightningnetwork/lnd/channeldb"
|
||||
"github.com/lightningnetwork/lnd/channeldb/kvdb"
|
||||
"github.com/lightningnetwork/lnd/channelnotifier"
|
||||
"github.com/lightningnetwork/lnd/clock"
|
||||
"github.com/lightningnetwork/lnd/contractcourt"
|
||||
@@ -708,7 +708,7 @@ func newServer(listenAddrs []net.Addr, chanDB *channeldb.DB,
|
||||
routingConfig := routerrpc.GetRoutingConfig(cfg.SubRPCServers.RouterRPC)
|
||||
|
||||
s.missionControl, err = routing.NewMissionControl(
|
||||
chanDB.DB,
|
||||
chanDB,
|
||||
&routing.MissionControlConfig{
|
||||
AprioriHopProbability: routingConfig.AprioriHopProbability,
|
||||
PenaltyHalfLife: routingConfig.PenaltyHalfLife,
|
||||
@@ -820,7 +820,7 @@ func newServer(listenAddrs []net.Addr, chanDB *channeldb.DB,
|
||||
sweep.DefaultBatchWindowDuration)
|
||||
|
||||
sweeperStore, err := sweep.NewSweeperStore(
|
||||
chanDB.DB, activeNetParams.GenesisHash,
|
||||
chanDB, activeNetParams.GenesisHash,
|
||||
)
|
||||
if err != nil {
|
||||
srvrLog.Errorf("unable to create sweeper store: %v", err)
|
||||
@@ -2126,7 +2126,7 @@ func (s *server) establishPersistentConnections() error {
|
||||
// each of the nodes.
|
||||
selfPub := s.identityPriv.PubKey().SerializeCompressed()
|
||||
err = sourceNode.ForEachChannel(nil, func(
|
||||
tx *bbolt.Tx,
|
||||
tx kvdb.ReadTx,
|
||||
chanInfo *channeldb.ChannelEdgeInfo,
|
||||
policy, _ *channeldb.ChannelEdgePolicy) error {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user