funding+server: don't use wallet DB for channel operations

Since the actual wallet backends might be different between the wallet
DB and the actual channel state DB, we pass in the correct struct to the
funding manager.
This commit is contained in:
Oliver Gugger committed 2023-08-18 09:44:05 +02:00
1 parent 4a03074fe8
commit 665179ece2
3 files changed
+15 -11

No files matched your search

+2
View File
@@ -432,6 +432,7 @@ func createTestFundingManager(t *testing.T, privKey *btcec.PrivateKey,
IDKeyLoc: testKeyLoc,
Wallet: lnw,
Notifier: chainNotifier,
ChannelDB: cdb,
FeeEstimator: estimator,
SignMessage: func(_ keychain.KeyLocator,
_ []byte, _ bool) (*ecdsa.Signature, error) {
@@ -601,6 +602,7 @@ func recreateAliceFundingManager(t *testing.T, alice *testNode) {
IDKeyLoc: oldCfg.IDKeyLoc,
Wallet: oldCfg.Wallet,
Notifier: oldCfg.Notifier,
ChannelDB: oldCfg.ChannelDB,
FeeEstimator: oldCfg.FeeEstimator,
SignMessage: func(_ keychain.KeyLocator,
_ []byte, _ bool) (*ecdsa.Signature, error) {