multi: move all channelstate operations to ChannelStateDB

This commit is contained in:
Andras Banki-Horvath
2021-09-21 19:18:17 +02:00
committed by Oliver Gugger
parent ddea833d31
commit 11cf4216e4
35 changed files with 377 additions and 238 deletions

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,
}