mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-07-16 16:12:36 +02:00
lnwallet: don't flip local/remote leaves
This commit is contained in:
@ -961,19 +961,12 @@ func (cb *CommitmentBuilder) createUnsignedCommitmentTx(ourBalance,
|
|||||||
auxLeaves,
|
auxLeaves,
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
// If we have aux leaves, then we'll actually reverse them for
|
|
||||||
// the commitment of the remote party.
|
|
||||||
remoteAuxLeaves := fn.MapOption(
|
|
||||||
func(leaves CommitAuxLeaves) CommitAuxLeaves {
|
|
||||||
return leaves.ForRemoteCommit()
|
|
||||||
},
|
|
||||||
)(auxLeaves)
|
|
||||||
commitTx, err = CreateCommitTx(
|
commitTx, err = CreateCommitTx(
|
||||||
cb.chanState.ChanType, fundingTxIn(cb.chanState), keyRing,
|
cb.chanState.ChanType, fundingTxIn(cb.chanState), keyRing,
|
||||||
&cb.chanState.RemoteChanCfg, &cb.chanState.LocalChanCfg,
|
&cb.chanState.RemoteChanCfg, &cb.chanState.LocalChanCfg,
|
||||||
theirBalance.ToSatoshis(), ourBalance.ToSatoshis(),
|
theirBalance.ToSatoshis(), ourBalance.ToSatoshis(),
|
||||||
numHTLCs, !cb.chanState.IsInitiator, leaseExpiry,
|
numHTLCs, !cb.chanState.IsInitiator, leaseExpiry,
|
||||||
remoteAuxLeaves,
|
auxLeaves,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Reference in New Issue
Block a user