mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-03-04 09:48:19 +01:00
lntest: use explicit channel commitment negotiation for multi-hop itests
This commit is contained in:
parent
449f207217
commit
523eef5cf4
2 changed files with 9 additions and 2 deletions
|
@ -982,6 +982,10 @@ type OpenChannelParams struct {
|
||||||
// SatPerVByte is the amount of satoshis to spend in chain fees per virtual
|
// SatPerVByte is the amount of satoshis to spend in chain fees per virtual
|
||||||
// byte of the transaction.
|
// byte of the transaction.
|
||||||
SatPerVByte btcutil.Amount
|
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
|
// 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),
|
RemoteMaxHtlcs: uint32(p.RemoteMaxHtlcs),
|
||||||
FundingShim: p.FundingShim,
|
FundingShim: p.FundingShim,
|
||||||
SatPerByte: int64(p.SatPerVByte),
|
SatPerByte: int64(p.SatPerVByte),
|
||||||
|
CommitmentType: p.CommitmentType,
|
||||||
}
|
}
|
||||||
|
|
||||||
respStream, err := srcNode.OpenChannel(ctx, openReq)
|
respStream, err := srcNode.OpenChannel(ctx, openReq)
|
||||||
|
|
|
@ -224,7 +224,8 @@ func createThreeHopNetwork(t *harnessTest, net *lntest.NetworkHarness,
|
||||||
aliceChanPoint := openChannelAndAssert(
|
aliceChanPoint := openChannelAndAssert(
|
||||||
t, net, alice, bob,
|
t, net, alice, bob,
|
||||||
lntest.OpenChannelParams{
|
lntest.OpenChannelParams{
|
||||||
Amt: chanAmt,
|
Amt: chanAmt,
|
||||||
|
CommitmentType: c,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -264,7 +265,8 @@ func createThreeHopNetwork(t *harnessTest, net *lntest.NetworkHarness,
|
||||||
bobChanPoint := openChannelAndAssert(
|
bobChanPoint := openChannelAndAssert(
|
||||||
t, net, bob, carol,
|
t, net, bob, carol,
|
||||||
lntest.OpenChannelParams{
|
lntest.OpenChannelParams{
|
||||||
Amt: chanAmt,
|
Amt: chanAmt,
|
||||||
|
CommitmentType: c,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
ctxt, _ = context.WithTimeout(ctxb, defaultTimeout)
|
ctxt, _ = context.WithTimeout(ctxb, defaultTimeout)
|
||||||
|
|
Loading…
Add table
Reference in a new issue