mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-06-15 03:12:26 +02:00
itest: add support for specifying chain fee rate
This commit is contained in:
parent
61f79d890c
commit
069de38186
@ -845,6 +845,10 @@ type OpenChannelParams struct {
|
|||||||
// FundingShim is an optional funding shim that the caller can specify
|
// FundingShim is an optional funding shim that the caller can specify
|
||||||
// in order to modify the channel funding workflow.
|
// in order to modify the channel funding workflow.
|
||||||
FundingShim *lnrpc.FundingShim
|
FundingShim *lnrpc.FundingShim
|
||||||
|
|
||||||
|
// SatPerVByte is the amount of satoshis to spend in chain fees per virtual
|
||||||
|
// byte of the transaction.
|
||||||
|
SatPerVByte btcutil.Amount
|
||||||
}
|
}
|
||||||
|
|
||||||
// OpenChannel attempts to open a channel between srcNode and destNode with the
|
// OpenChannel attempts to open a channel between srcNode and destNode with the
|
||||||
@ -882,6 +886,7 @@ func (n *NetworkHarness) OpenChannel(ctx context.Context,
|
|||||||
MinHtlcMsat: int64(p.MinHtlc),
|
MinHtlcMsat: int64(p.MinHtlc),
|
||||||
RemoteMaxHtlcs: uint32(p.RemoteMaxHtlcs),
|
RemoteMaxHtlcs: uint32(p.RemoteMaxHtlcs),
|
||||||
FundingShim: p.FundingShim,
|
FundingShim: p.FundingShim,
|
||||||
|
SatPerByte: int64(p.SatPerVByte),
|
||||||
}
|
}
|
||||||
|
|
||||||
respStream, err := srcNode.OpenChannel(ctx, openReq)
|
respStream, err := srcNode.OpenChannel(ctx, openReq)
|
||||||
|
@ -1253,6 +1253,7 @@ func basicChannelFundingTest(t *harnessTest, net *lntest.NetworkHarness,
|
|||||||
|
|
||||||
chanAmt := funding.MaxBtcFundingAmount
|
chanAmt := funding.MaxBtcFundingAmount
|
||||||
pushAmt := btcutil.Amount(100000)
|
pushAmt := btcutil.Amount(100000)
|
||||||
|
satPerVbyte := btcutil.Amount(1)
|
||||||
|
|
||||||
// Record nodes' channel balance before testing.
|
// Record nodes' channel balance before testing.
|
||||||
aliceChannelBalance := getChannelBalance(t, alice)
|
aliceChannelBalance := getChannelBalance(t, alice)
|
||||||
@ -1293,6 +1294,7 @@ func basicChannelFundingTest(t *harnessTest, net *lntest.NetworkHarness,
|
|||||||
Amt: chanAmt,
|
Amt: chanAmt,
|
||||||
PushAmt: pushAmt,
|
PushAmt: pushAmt,
|
||||||
FundingShim: fundingShim,
|
FundingShim: fundingShim,
|
||||||
|
SatPerVByte: satPerVbyte,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user