multi: refactor lnwallet/channel.go to use ChannelParty in select places

We also include changes to contractcourt, htlcswitch and peer to stitch the
boundaries together.
This commit is contained in:
Keagan McClelland
2024-07-30 16:44:18 -07:00
parent 33934449ac
commit 0996e4f163
10 changed files with 409 additions and 361 deletions

View File

@@ -25,6 +25,7 @@ import (
"github.com/lightningnetwork/lnd/channeldb"
"github.com/lightningnetwork/lnd/input"
"github.com/lightningnetwork/lnd/keychain"
"github.com/lightningnetwork/lnd/lntypes"
"github.com/lightningnetwork/lnd/lnwallet/chainfee"
"github.com/lightningnetwork/lnd/lnwallet/chanfunding"
"github.com/lightningnetwork/lnd/lnwallet/chanvalidate"
@@ -1475,10 +1476,12 @@ func CreateCommitmentTxns(localBalance, remoteBalance btcutil.Amount,
leaseExpiry uint32) (*wire.MsgTx, *wire.MsgTx, error) {
localCommitmentKeys := DeriveCommitmentKeys(
localCommitPoint, true, chanType, ourChanCfg, theirChanCfg,
localCommitPoint, lntypes.Local, chanType, ourChanCfg,
theirChanCfg,
)
remoteCommitmentKeys := DeriveCommitmentKeys(
remoteCommitPoint, false, chanType, ourChanCfg, theirChanCfg,
remoteCommitPoint, lntypes.Remote, chanType, ourChanCfg,
theirChanCfg,
)
ourCommitTx, err := CreateCommitTx(