Skip to content

Commit

Permalink
funding+lnwallet: finish hook up new aux funding flow
Browse files Browse the repository at this point in the history
For the initiator, once we get the signal that the PSBT has been
finalized, we'll call into the aux funder to get the funding desc. For
the responder, once we receive the funding_created message, we'll do the
same.

We now also have local+remote aux leaves for the commitment transaction.
  • Loading branch information
Roasbeef authored and guggero committed Apr 24, 2024
1 parent a75fa85 commit bdbfd4c
Show file tree
Hide file tree
Showing 4 changed files with 153 additions and 32 deletions.
9 changes: 5 additions & 4 deletions funding/aux_funding.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package funding

import (
"github.com/btcsuite/btcd/chaincfg/chainhash"
"github.com/lightningnetwork/lnd/channeldb"
"github.com/lightningnetwork/lnd/fn"
"github.com/lightningnetwork/lnd/lnwallet"
"github.com/lightningnetwork/lnd/protofsm"
Expand All @@ -20,10 +21,10 @@ type AuxFundingController interface {
// DescPendingChanID takes a pending channel ID, that may already be
// known due to prior custom channel messages, and maybe returns an aux
// funding desc which can be used to modify how a channel is funded.
//
// TODO(roasbeef): erorr on validation if fail due to invalid root
// match?
DescFromPendingChanID(PendingChanID) fn.Option[lnwallet.AuxFundingDesc]
DescFromPendingChanID(pid PendingChanID,
openChan *channeldb.OpenChannel,
localKeyRing, remoteKeyRing lnwallet.CommitmentKeyRing,
initiator bool) fn.Option[lnwallet.AuxFundingDesc]

// DeriveTapscriptRoot takes a pending channel ID and maybe returns a
// tapscript root that should be used when creating any musig2 sessions
Expand Down
51 changes: 42 additions & 9 deletions funding/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ const (
// you and limitless channel size (apart from 21 million cap).
MaxBtcFundingAmountWumbo = btcutil.Amount(1000000000)

// TODO(roasbeef): tune.
msgBufferSize = 50

// MaxWaitNumBlocksFundingConf is the maximum number of blocks to wait
Expand Down Expand Up @@ -2232,10 +2231,29 @@ func (f *Manager) waitForPsbt(intent *chanfunding.PsbtIntent,
return
}

// At this point, we'll see if there's an AuxFundingDesc we
// need to deliver so the funding process can continue
// properly.
chanState := resCtx.reservation.ChanState()
localKeys, remoteKeys := resCtx.reservation.CommitmentKeyRings()
auxFundingDesc := fn.MapOption(
func(a AuxFundingController) fn.Option[lnwallet.AuxFundingDesc] {
return a.DescFromPendingChanID(
cid.tempChanID, chanState, *localKeys,
*remoteKeys, true,
)
},
)(f.cfg.AuxFundingController)

// A non-nil error means we can continue the funding flow.
// Notify the wallet so it can prepare everything we need to
// continue.
err = resCtx.reservation.ProcessPsbt()
//
// We'll also pass along the aux funding controller as well,
// which may be used to help process the finalized PSBT.
err = resCtx.reservation.ProcessPsbt(
fn.FlattenOption(auxFundingDesc),
)
if err != nil {
failFlow("error continuing PSBT flow", err)
return
Expand Down Expand Up @@ -2299,6 +2317,10 @@ func (f *Manager) continueFundingAccept(resCtx *reservationWithCtx,
// funding flow fails.
cid.setChanID(channelID)

// Now that we're ready to resume the funding flow, we'll call into the
// aux controller with the final funding details so we can obtain the
// funding descs we need.

// Send the FundingCreated msg.
fundingCreated := &lnwire.FundingCreated{
PendingChannelID: cid.tempChanID,
Expand Down Expand Up @@ -2361,7 +2383,6 @@ func (f *Manager) fundeeProcessFundingCreated(peer lnpeer.Peer,
// final funding transaction, as well as a signature for our version of
// the commitment transaction. So at this point, we can validate the
// initiator's commitment transaction, then send our own if it's valid.
// TODO(roasbeef): make case (p vs P) consistent throughout
fundingOut := msg.FundingPoint
log.Infof("completing pending_id(%x) with ChannelPoint(%v)",
pendingChanID[:], fundingOut)
Expand Down Expand Up @@ -2393,16 +2414,32 @@ func (f *Manager) fundeeProcessFundingCreated(peer lnpeer.Peer,
}
}

// At this point, we'll see if there's an AuxFundingDesc we need to
// deliver so the funding process can continue properly.
chanState := resCtx.reservation.ChanState()
localKeys, remoteKeys := resCtx.reservation.CommitmentKeyRings()
auxFundingDesc := fn.MapOption(
func(a AuxFundingController) fn.Option[lnwallet.AuxFundingDesc] {
return a.DescFromPendingChanID(
cid.tempChanID, chanState, *localKeys,
*remoteKeys, true,
)
},
)(f.cfg.AuxFundingController)

// With all the necessary data available, attempt to advance the
// funding workflow to the next stage. If this succeeds then the
// funding transaction will broadcast after our next message.
// CompleteReservationSingle will also mark the channel as 'IsPending'
// in the database.
//
// We'll also directly pass in the AuxFundiner controller as well,
// which may be used by the reservation system to finalize funding our
// our side.
completeChan, err := resCtx.reservation.CompleteReservationSingle(
&fundingOut, commitSig,
&fundingOut, commitSig, fn.FlattenOption(auxFundingDesc),
)
if err != nil {
// TODO(roasbeef): better error logging: peerID, channelID, etc.
log.Errorf("unable to complete single reservation: %v", err)
f.failFundingFlow(peer, cid, err)
return
Expand Down Expand Up @@ -2713,9 +2750,6 @@ func (f *Manager) funderProcessFundingSigned(peer lnpeer.Peer,

// Send an update to the upstream client that the negotiation process
// is over.
//
// TODO(roasbeef): add abstraction over updates to accommodate
// long-polling, or SSE, etc.
upd := &lnrpc.OpenStatusUpdate{
Update: &lnrpc.OpenStatusUpdate_ChanPending{
ChanPending: &lnrpc.PendingUpdate{
Expand Down Expand Up @@ -4420,7 +4454,6 @@ func (f *Manager) announceChannel(localIDKey, remoteIDKey *btcec.PublicKey,

// InitFundingWorkflow sends a message to the funding manager instructing it
// to initiate a single funder workflow with the source peer.
// TODO(roasbeef): re-visit blocking nature..
func (f *Manager) InitFundingWorkflow(msg *InitFundingMsg) {
f.fundingRequests <- msg
}
Expand Down
46 changes: 41 additions & 5 deletions lnwallet/reservation.go
Original file line number Diff line number Diff line change
Expand Up @@ -611,12 +611,15 @@ func (r *ChannelReservation) IsCannedShim() bool {
}

// ProcessPsbt continues a previously paused funding flow that involves PSBT to
// construct the funding transaction. This method can be called once the PSBT is
// finalized and the signed transaction is available.
func (r *ChannelReservation) ProcessPsbt() error {
// construct the funding transaction. This method can be called once the PSBT
// is finalized and the signed transaction is available.
func (r *ChannelReservation) ProcessPsbt(
auxFundingDesc fn.Option[AuxFundingDesc]) error {

Check failure on line 617 in lnwallet/reservation.go

View workflow job for this annotation

GitHub Actions / run windows itest

undefined: fn

Check failure on line 617 in lnwallet/reservation.go

View workflow job for this annotation

GitHub Actions / run macOS itest

undefined: fn

Check failure on line 617 in lnwallet/reservation.go

View workflow job for this annotation

GitHub Actions / RPC and mobile compilation check

undefined: fn

Check failure on line 617 in lnwallet/reservation.go

View workflow job for this annotation

GitHub Actions / run ubuntu itests (bitcoind, backend=bitcoind)

undefined: fn

Check failure on line 617 in lnwallet/reservation.go

View workflow job for this annotation

GitHub Actions / run ubuntu itests (bitcoind-etcd, backend=bitcoind dbbackend=etcd)

undefined: fn

Check failure on line 617 in lnwallet/reservation.go

View workflow job for this annotation

GitHub Actions / run ubuntu itests (bitcoind-postgres, backend=bitcoind dbbackend=postgres)

undefined: fn

Check failure on line 617 in lnwallet/reservation.go

View workflow job for this annotation

GitHub Actions / run ubuntu itests (bitcoind-notxindex, backend="bitcoind notxindex")

undefined: fn

Check failure on line 617 in lnwallet/reservation.go

View workflow job for this annotation

GitHub Actions / run unit tests (unit tags="kvdb_sqlite")

undefined: fn

Check failure on line 617 in lnwallet/reservation.go

View workflow job for this annotation

GitHub Actions / run unit tests (unit tags="kvdb_sqlite")

undefined: fn

Check failure on line 617 in lnwallet/reservation.go

View workflow job for this annotation

GitHub Actions / run unit tests (unit tags="kvdb_postgres")

undefined: fn

Check failure on line 617 in lnwallet/reservation.go

View workflow job for this annotation

GitHub Actions / run unit tests (unit tags="kvdb_postgres")

undefined: fn

Check failure on line 617 in lnwallet/reservation.go

View workflow job for this annotation

GitHub Actions / run ubuntu itests (bitcoind-rpcpolling, backend="bitcoind rpcpolling")

undefined: fn

Check failure on line 617 in lnwallet/reservation.go

View workflow job for this annotation

GitHub Actions / run ubuntu itests (bitcoind-postgres-nativesql, backend=bitcoind dbbackend=postgres nativesql=true)

undefined: fn

Check failure on line 617 in lnwallet/reservation.go

View workflow job for this annotation

GitHub Actions / run ubuntu itests (bitcoind-sqlite, backend=bitcoind dbbackend=sqlite)

undefined: fn

Check failure on line 617 in lnwallet/reservation.go

View workflow job for this annotation

GitHub Actions / run unit tests (unit tags="kvdb_etcd")

undefined: fn

Check failure on line 617 in lnwallet/reservation.go

View workflow job for this annotation

GitHub Actions / run unit tests (unit tags="kvdb_etcd")

undefined: fn

Check failure on line 617 in lnwallet/reservation.go

View workflow job for this annotation

GitHub Actions / run ubuntu itests (bitcoind-sqlite-nativesql, backend=bitcoind dbbackend=sqlite nativesql=true)

undefined: fn

Check failure on line 617 in lnwallet/reservation.go

View workflow job for this annotation

GitHub Actions / run ubuntu itests (neutrino, backend=neutrino)

undefined: fn

Check failure on line 617 in lnwallet/reservation.go

View workflow job for this annotation

GitHub Actions / run ubuntu itests (btcd, backend=btcd)

undefined: fn

Check failure on line 617 in lnwallet/reservation.go

View workflow job for this annotation

GitHub Actions / run unit tests (btcd unit-race)

undefined: fn

Check failure on line 617 in lnwallet/reservation.go

View workflow job for this annotation

GitHub Actions / run unit tests (btcd unit-race)

undefined: fn

errChan := make(chan error, 1)

r.wallet.msgChan <- &continueContributionMsg{
auxFundingDesc: auxFundingDesc,
pendingFundingID: r.reservationID,
err: errChan,
}
Expand Down Expand Up @@ -718,8 +721,10 @@ func (r *ChannelReservation) CompleteReservation(fundingInputScripts []*input.Sc
// available via the .OurSignatures() method. As this method should only be
// called as a response to a single funder channel, only a commitment signature
// will be populated.
func (r *ChannelReservation) CompleteReservationSingle(fundingPoint *wire.OutPoint,
commitSig input.Signature) (*channeldb.OpenChannel, error) {
func (r *ChannelReservation) CompleteReservationSingle(
fundingPoint *wire.OutPoint, commitSig input.Signature,
auxFundingDesc fn.Option[AuxFundingDesc],

Check failure on line 726 in lnwallet/reservation.go

View workflow job for this annotation

GitHub Actions / run windows itest

undefined: fn

Check failure on line 726 in lnwallet/reservation.go

View workflow job for this annotation

GitHub Actions / run macOS itest

undefined: fn

Check failure on line 726 in lnwallet/reservation.go

View workflow job for this annotation

GitHub Actions / RPC and mobile compilation check

undefined: fn

Check failure on line 726 in lnwallet/reservation.go

View workflow job for this annotation

GitHub Actions / run ubuntu itests (bitcoind, backend=bitcoind)

undefined: fn

Check failure on line 726 in lnwallet/reservation.go

View workflow job for this annotation

GitHub Actions / run ubuntu itests (bitcoind-etcd, backend=bitcoind dbbackend=etcd)

undefined: fn

Check failure on line 726 in lnwallet/reservation.go

View workflow job for this annotation

GitHub Actions / run ubuntu itests (bitcoind-postgres, backend=bitcoind dbbackend=postgres)

undefined: fn

Check failure on line 726 in lnwallet/reservation.go

View workflow job for this annotation

GitHub Actions / run ubuntu itests (bitcoind-notxindex, backend="bitcoind notxindex")

undefined: fn

Check failure on line 726 in lnwallet/reservation.go

View workflow job for this annotation

GitHub Actions / run unit tests (unit tags="kvdb_sqlite")

undefined: fn

Check failure on line 726 in lnwallet/reservation.go

View workflow job for this annotation

GitHub Actions / run unit tests (unit tags="kvdb_sqlite")

undefined: fn

Check failure on line 726 in lnwallet/reservation.go

View workflow job for this annotation

GitHub Actions / run unit tests (unit tags="kvdb_postgres")

undefined: fn

Check failure on line 726 in lnwallet/reservation.go

View workflow job for this annotation

GitHub Actions / run unit tests (unit tags="kvdb_postgres")

undefined: fn

Check failure on line 726 in lnwallet/reservation.go

View workflow job for this annotation

GitHub Actions / run ubuntu itests (bitcoind-rpcpolling, backend="bitcoind rpcpolling")

undefined: fn

Check failure on line 726 in lnwallet/reservation.go

View workflow job for this annotation

GitHub Actions / run ubuntu itests (bitcoind-postgres-nativesql, backend=bitcoind dbbackend=postgres nativesql=true)

undefined: fn

Check failure on line 726 in lnwallet/reservation.go

View workflow job for this annotation

GitHub Actions / run ubuntu itests (bitcoind-sqlite, backend=bitcoind dbbackend=sqlite)

undefined: fn

Check failure on line 726 in lnwallet/reservation.go

View workflow job for this annotation

GitHub Actions / run unit tests (unit tags="kvdb_etcd")

undefined: fn

Check failure on line 726 in lnwallet/reservation.go

View workflow job for this annotation

GitHub Actions / run unit tests (unit tags="kvdb_etcd")

undefined: fn

Check failure on line 726 in lnwallet/reservation.go

View workflow job for this annotation

GitHub Actions / run ubuntu itests (bitcoind-sqlite-nativesql, backend=bitcoind dbbackend=sqlite nativesql=true)

undefined: fn

Check failure on line 726 in lnwallet/reservation.go

View workflow job for this annotation

GitHub Actions / run ubuntu itests (neutrino, backend=neutrino)

undefined: fn

Check failure on line 726 in lnwallet/reservation.go

View workflow job for this annotation

GitHub Actions / run ubuntu itests (btcd, backend=btcd)

undefined: fn

Check failure on line 726 in lnwallet/reservation.go

View workflow job for this annotation

GitHub Actions / run unit tests (btcd unit-race)

undefined: fn

Check failure on line 726 in lnwallet/reservation.go

View workflow job for this annotation

GitHub Actions / run unit tests (btcd unit-race)

undefined: fn
) (*channeldb.OpenChannel, error) {

errChan := make(chan error, 1)
completeChan := make(chan *channeldb.OpenChannel, 1)
Expand All @@ -729,6 +734,7 @@ func (r *ChannelReservation) CompleteReservationSingle(fundingPoint *wire.OutPoi
fundingOutpoint: fundingPoint,
theirCommitmentSig: commitSig,
completeChan: completeChan,
auxFundingDesc: auxFundingDesc,
err: errChan,
}

Expand Down Expand Up @@ -814,6 +820,36 @@ func (r *ChannelReservation) Cancel() error {
return <-errChan
}

// ChanState the current open channel state.
func (r *ChannelReservation) ChanState() *channeldb.OpenChannel {
r.RLock()
defer r.RUnlock()
return r.partialState
}

// CommitmentKeyRings returns the local+remote key ring used for the very first
// commitment transaction both parties.
func (r *ChannelReservation) CommitmentKeyRings() (*CommitmentKeyRing, *CommitmentKeyRing) {
r.RLock()
defer r.RUnlock()

chanType := r.partialState.ChanType
ourChanCfg := r.ourContribution.ChannelConfig
theirChanCfg := r.theirContribution.ChannelConfig

localKeys := DeriveCommitmentKeys(
r.ourContribution.FirstCommitmentPoint, true, chanType,
ourChanCfg, theirChanCfg,
)

remoteKeys := DeriveCommitmentKeys(
r.theirContribution.FirstCommitmentPoint, false, chanType,
ourChanCfg, theirChanCfg,
)

return localKeys, remoteKeys
}

// VerifyConstraints is a helper function that can be used to check the sanity
// of various channel constraints.
func VerifyConstraints(c *channeldb.ChannelConstraints,
Expand Down
79 changes: 65 additions & 14 deletions lnwallet/wallet.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,8 @@ type addContributionMsg struct {
type continueContributionMsg struct {
pendingFundingID uint64

auxFundingDesc fn.Option[AuxFundingDesc]

// NOTE: In order to avoid deadlocks, this channel MUST be buffered.
err chan error
}
Expand Down Expand Up @@ -335,6 +337,8 @@ type addCounterPartySigsMsg struct {
type addSingleFunderSigsMsg struct {
pendingFundingID uint64

auxFundingDesc fn.Option[AuxFundingDesc]

// fundingOutpoint is the outpoint of the completed funding
// transaction as assembled by the workflow initiator.
fundingOutpoint *wire.OutPoint
Expand Down Expand Up @@ -1478,7 +1482,8 @@ func (l *LightningWallet) handleFundingCancelRequest(req *fundingReserveCancelMs
// createCommitOpts is a struct that holds the options for creating a a new
// commitment transaction.
type createCommitOpts struct {
auxLeaves fn.Option[CommitAuxLeaves]
localAuxLeaves fn.Option[CommitAuxLeaves]
remoteAuxLeaves fn.Option[CommitAuxLeaves]
}

// defaultCommitOpts returns a new createCommitOpts with default values.
Expand All @@ -1488,11 +1493,12 @@ func defaultCommitOpts() createCommitOpts {

// WithAuxLeaves is a functional option that can be used to set the aux leaves
// for a new commitment transaction.
//
// TODO(roasbeef): local+remote leaves
func WithAuxLeaves(leaves fn.Option[CommitAuxLeaves]) CreateCommitOpt {
func WithAuxLeaves(localLeaves, remoteLeaves fn.Option[CommitAuxLeaves],
) CreateCommitOpt {

return func(o *createCommitOpts) {
o.auxLeaves = leaves
o.localAuxLeaves = localLeaves
o.remoteAuxLeaves = remoteLeaves
}
}

Expand Down Expand Up @@ -1527,7 +1533,7 @@ func CreateCommitmentTxns(localBalance, remoteBalance btcutil.Amount,
ourCommitTx, err := CreateCommitTx(
chanType, fundingTxIn, localCommitmentKeys, ourChanCfg,
theirChanCfg, localBalance, remoteBalance, 0, initiator,
leaseExpiry, options.auxLeaves,
leaseExpiry, options.localAuxLeaves,
)
if err != nil {
return nil, nil, err
Expand All @@ -1541,7 +1547,7 @@ func CreateCommitmentTxns(localBalance, remoteBalance btcutil.Amount,
theirCommitTx, err := CreateCommitTx(
chanType, fundingTxIn, remoteCommitmentKeys, theirChanCfg,
ourChanCfg, remoteBalance, localBalance, 0, !initiator,
leaseExpiry, options.auxLeaves,
leaseExpiry, options.remoteAuxLeaves,
)
if err != nil {
return nil, nil, err
Expand Down Expand Up @@ -1820,6 +1826,24 @@ func (l *LightningWallet) handleChanPointReady(req *continueContributionMsg) {
return
}

chanState := pendingReservation.partialState

// If we have an aux funding desc, then we can use it to populate some
// of the optional, but opaque TLV blobs we'll carry for the channel.
chanState.CustomBlob = fn.MapOption(func(desc AuxFundingDesc) tlv.Blob {
return desc.CustomFundingBlob
})(req.auxFundingDesc)
chanState.LocalCommitment.CustomBlob = fn.MapOption(
func(desc AuxFundingDesc) tlv.Blob {
return desc.CustomLocalCommitBlob
},
)(req.auxFundingDesc)
chanState.RemoteCommitment.CustomBlob = fn.MapOption(
func(desc AuxFundingDesc) tlv.Blob {
return desc.CustomRemoteCommitBlob
},
)(req.auxFundingDesc)

ourContribution := pendingReservation.ourContribution
theirContribution := pendingReservation.theirContribution
chanPoint := pendingReservation.partialState.FundingOutpoint
Expand Down Expand Up @@ -1878,7 +1902,6 @@ func (l *LightningWallet) handleChanPointReady(req *continueContributionMsg) {
// Store their current commitment point. We'll need this after the
// first state transition in order to verify the authenticity of the
// revocation.
chanState := pendingReservation.partialState
chanState.RemoteCurrentRevocation = theirContribution.FirstCommitmentPoint

// Create the txin to our commitment transaction; required to construct
Expand All @@ -1895,14 +1918,21 @@ func (l *LightningWallet) handleChanPointReady(req *continueContributionMsg) {
leaseExpiry = pendingReservation.partialState.ThawHeight
}

localAuxLeaves := fn.MapOption(func(desc AuxFundingDesc) CommitAuxLeaves {
return desc.LocalInitAuxLeaves
})(req.auxFundingDesc)
remoteAuxLeaves := fn.MapOption(func(desc AuxFundingDesc) CommitAuxLeaves {
return desc.RemoteInitAuxLeaves
})(req.auxFundingDesc)

ourCommitTx, theirCommitTx, err := CreateCommitmentTxns(
localBalance, remoteBalance, ourContribution.ChannelConfig,
theirContribution.ChannelConfig,
ourContribution.FirstCommitmentPoint,
theirContribution.FirstCommitmentPoint, fundingTxIn,
pendingReservation.partialState.ChanType,
pendingReservation.partialState.IsInitiator, leaseExpiry,
WithAuxLeaves(pendingReservation.initAuxLeaves),
WithAuxLeaves(localAuxLeaves, remoteAuxLeaves),
)
if err != nil {
req.err <- err
Expand Down Expand Up @@ -2318,11 +2348,24 @@ func (l *LightningWallet) handleSingleFunderSigs(req *addSingleFunderSigsMsg) {
pendingReservation.Lock()
defer pendingReservation.Unlock()

// TODO(roasbeef): get funding desc
// * set all blobs
// * get the local+remote commitAux leaves for below commitment txns

chanState := pendingReservation.partialState

// If we have an aux funding desc, then we can use it to populate some
// of the optional, but opaque TLV blobs we'll carry for the channel.
chanState.CustomBlob = fn.MapOption(func(desc AuxFundingDesc) tlv.Blob {
return desc.CustomFundingBlob
})(req.auxFundingDesc)
chanState.LocalCommitment.CustomBlob = fn.MapOption(
func(desc AuxFundingDesc) tlv.Blob {
return desc.CustomLocalCommitBlob
},
)(req.auxFundingDesc)
chanState.RemoteCommitment.CustomBlob = fn.MapOption(
func(desc AuxFundingDesc) tlv.Blob {
return desc.CustomRemoteCommitBlob
},
)(req.auxFundingDesc)

chanType := pendingReservation.partialState.ChanType
chanState.FundingOutpoint = *req.fundingOutpoint
fundingTxIn := wire.NewTxIn(req.fundingOutpoint, nil, nil)
Expand All @@ -2336,6 +2379,14 @@ func (l *LightningWallet) handleSingleFunderSigs(req *addSingleFunderSigsMsg) {
if pendingReservation.partialState.ChanType.HasLeaseExpiration() {
leaseExpiry = pendingReservation.partialState.ThawHeight
}

localAuxLeaves := fn.MapOption(func(desc AuxFundingDesc) CommitAuxLeaves {
return desc.LocalInitAuxLeaves
})(req.auxFundingDesc)
remoteAuxLeaves := fn.MapOption(func(desc AuxFundingDesc) CommitAuxLeaves {
return desc.RemoteInitAuxLeaves
})(req.auxFundingDesc)

ourCommitTx, theirCommitTx, err := CreateCommitmentTxns(
localBalance, remoteBalance,
pendingReservation.ourContribution.ChannelConfig,
Expand All @@ -2344,7 +2395,7 @@ func (l *LightningWallet) handleSingleFunderSigs(req *addSingleFunderSigsMsg) {
pendingReservation.theirContribution.FirstCommitmentPoint,
*fundingTxIn, chanType,
pendingReservation.partialState.IsInitiator, leaseExpiry,
WithAuxLeaves(pendingReservation.initAuxLeaves),
WithAuxLeaves(localAuxLeaves, remoteAuxLeaves),
)
if err != nil {
req.err <- err
Expand Down

0 comments on commit bdbfd4c

Please sign in to comment.