lntest: use explicit channel commitment negotiation for multi-hop itests

This commit is contained in:
Wilmer Paulino 2021-06-09 16:38:45 -07:00 committed by Olaoluwa Osuntokun
parent 449f207217
commit 523eef5cf4
No known key found for this signature in database
GPG key ID: 3BBD59E99B280306
2 changed files with 9 additions and 2 deletions

View file

@ -982,6 +982,10 @@ type OpenChannelParams struct {
// SatPerVByte is the amount of satoshis to spend in chain fees per virtual
// byte of the transaction.
SatPerVByte btcutil.Amount
// CommitmentType is the commitment type that should be used for the
// channel to be opened.
CommitmentType lnrpc.CommitmentType
}
// OpenChannel attempts to open a channel between srcNode and destNode with the
@ -1025,6 +1029,7 @@ func (n *NetworkHarness) OpenChannel(srcNode, destNode *HarnessNode,
RemoteMaxHtlcs: uint32(p.RemoteMaxHtlcs),
FundingShim: p.FundingShim,
SatPerByte: int64(p.SatPerVByte),
CommitmentType: p.CommitmentType,
}
respStream, err := srcNode.OpenChannel(ctx, openReq)

View file

@ -225,6 +225,7 @@ func createThreeHopNetwork(t *harnessTest, net *lntest.NetworkHarness,
t, net, alice, bob,
lntest.OpenChannelParams{
Amt: chanAmt,
CommitmentType: c,
},
)
@ -265,6 +266,7 @@ func createThreeHopNetwork(t *harnessTest, net *lntest.NetworkHarness,
t, net, bob, carol,
lntest.OpenChannelParams{
Amt: chanAmt,
CommitmentType: c,
},
)
ctxt, _ = context.WithTimeout(ctxb, defaultTimeout)