multi: move all channelstate operations to ChannelStateDB

This commit is contained in:
Andras Banki-Horvath authored and Oliver Gugger committed 2021-09-29 17:00:03 +02:00
1 parent ddea833d31
commit 11cf4216e4
35 files changed
+377 -238

No files matched your search

+4 -2
View File
@@ -261,7 +261,7 @@ func (n *testNode) AddNewChannel(channel *channeldb.OpenChannel,
}
}
func createTestWallet(cdb *channeldb.DB, netParams *chaincfg.Params,
func createTestWallet(cdb *channeldb.ChannelStateDB, netParams *chaincfg.Params,
notifier chainntnfs.ChainNotifier, wc lnwallet.WalletController,
signer input.Signer, keyRing keychain.SecretKeyRing,
bio lnwallet.BlockChainIO,
@@ -329,11 +329,13 @@ func createTestFundingManager(t *testing.T, privKey *btcec.PrivateKey,
}
dbDir := filepath.Join(tempTestDir, "cdb")
cdb, err := channeldb.Open(dbDir)
fullDB, err := channeldb.Open(dbDir)
if err != nil {
return nil, err
}
cdb := fullDB.ChannelStateDB()
keyRing := &mock.SecretKeyRing{
RootKey: alicePrivKey,
}