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:
5 files changed
+105
-62
No files matched your search
+4
-4
@@ -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
|
||||
|
||||
Reference in new issue
Block a user