rpcserver+fundingmanager: thread remote_max_htlcs to channel opening
This commit is contained in:
3 files changed
+19
-5
No files matched your search
@@ -855,6 +855,11 @@ type OpenChannelParams struct {
|
||||
// MinHtlc is the htlc_minimum_msat value set when opening the channel.
|
||||
MinHtlc lnwire.MilliSatoshi
|
||||
|
||||
// RemoteMaxHtlcs is the remote_max_htlcs value set when opening the
|
||||
// channel, restricting the number of concurrent HTLCs the remote party
|
||||
// can add to a commitment.
|
||||
RemoteMaxHtlcs uint16
|
||||
|
||||
// FundingShim is an optional funding shim that the caller can specify
|
||||
// in order to modify the channel funding workflow.
|
||||
FundingShim *lnrpc.FundingShim
|
||||
@@ -893,6 +898,7 @@ func (n *NetworkHarness) OpenChannel(ctx context.Context,
|
||||
MinConfs: minConfs,
|
||||
SpendUnconfirmed: p.SpendUnconfirmed,
|
||||
MinHtlcMsat: int64(p.MinHtlc),
|
||||
RemoteMaxHtlcs: uint32(p.RemoteMaxHtlcs),
|
||||
FundingShim: p.FundingShim,
|
||||
}
|
||||
|
||||
|
||||
@@ -4848,9 +4848,7 @@ func testListChannels(net *lntest.NetworkHarness, t *harnessTest) {
|
||||
const bobRemoteMaxHtlcs = 100
|
||||
|
||||
// Create two fresh nodes and open a channel between them.
|
||||
alice, err := net.NewNode("Alice", []string{
|
||||
fmt.Sprintf("--default-remote-max-htlcs=%v", aliceRemoteMaxHtlcs),
|
||||
})
|
||||
alice, err := net.NewNode("Alice", nil)
|
||||
if err != nil {
|
||||
t.Fatalf("unable to create new node: %v", err)
|
||||
}
|
||||
@@ -4887,8 +4885,9 @@ func testListChannels(net *lntest.NetworkHarness, t *harnessTest) {
|
||||
chanPoint := openChannelAndAssert(
|
||||
ctxt, t, net, alice, bob,
|
||||
lntest.OpenChannelParams{
|
||||
Amt: chanAmt,
|
||||
MinHtlc: customizedMinHtlc,
|
||||
Amt: chanAmt,
|
||||
MinHtlc: customizedMinHtlc,
|
||||
RemoteMaxHtlcs: aliceRemoteMaxHtlcs,
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
Reference in new issue
Block a user