lnwallet: use channel type to derive remote script

Based on the current channel type, we derive the script used for the
to_remote output. Currently only the unencumbered p2wkh type is used,
but that will change with upcoming channel types.
This commit is contained in:
Johan T. Halseth committed 2020-01-06 12:08:19 +01:00
1 parent 9b5809a884
commit a56ed72bd7
5 files changed
+105 -62

No files matched your search

+4 -4
View File
@@ -783,8 +783,8 @@ func CreateCommitmentTxns(localBalance, remoteBalance btcutil.Amount,
)
ourCommitTx, err := CreateCommitTx(
fundingTxIn, localCommitmentKeys, ourChanCfg, theirChanCfg,
localBalance, remoteBalance,
chanType, fundingTxIn, localCommitmentKeys, ourChanCfg,
theirChanCfg, localBalance, remoteBalance,
)
if err != nil {
return nil, nil, err
@@ -796,8 +796,8 @@ func CreateCommitmentTxns(localBalance, remoteBalance btcutil.Amount,
}
theirCommitTx, err := CreateCommitTx(
fundingTxIn, remoteCommitmentKeys, theirChanCfg, ourChanCfg,
remoteBalance, localBalance,
chanType, fundingTxIn, remoteCommitmentKeys, theirChanCfg,
ourChanCfg, remoteBalance, localBalance,
)
if err != nil {
return nil, nil, err