From f3dff2ae974f0616bc838d5f7140032aef0be8c3 Mon Sep 17 00:00:00 2001 From: "Johan T. Halseth" Date: Sun, 17 Dec 2017 00:00:11 +0100 Subject: [PATCH] rpcserver: add min_htlc_msat parameter to OpenChannel and OpenChannelSync --- rpcserver.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rpcserver.go b/rpcserver.go index 0f6495b8..744690e0 100644 --- a/rpcserver.go +++ b/rpcserver.go @@ -551,6 +551,7 @@ func (r *rpcServer) OpenChannel(in *lnrpc.OpenChannelRequest, localFundingAmt := btcutil.Amount(in.LocalFundingAmount) remoteInitialBalance := btcutil.Amount(in.PushSat) + minHtlc := lnwire.MilliSatoshi(in.MinHtlcMsat) // Ensure that the initial balance of the remote party (if pushing // satoshis) does not exceed the amount the local party has requested @@ -627,7 +628,7 @@ func (r *rpcServer) OpenChannel(in *lnrpc.OpenChannelRequest, updateChan, errChan := r.server.OpenChannel( in.TargetPeerId, nodePubKey, localFundingAmt, lnwire.NewMSatFromSatoshis(remoteInitialBalance), - feePerByte, in.Private, + minHtlc, feePerByte, in.Private, ) var outpoint wire.OutPoint @@ -722,6 +723,7 @@ func (r *rpcServer) OpenChannelSync(ctx context.Context, localFundingAmt := btcutil.Amount(in.LocalFundingAmount) remoteInitialBalance := btcutil.Amount(in.PushSat) + minHtlc := lnwire.MilliSatoshi(in.MinHtlcMsat) // Ensure that the initial balance of the remote party (if pushing // satoshis) does not exceed the amount the local party has requested @@ -746,7 +748,7 @@ func (r *rpcServer) OpenChannelSync(ctx context.Context, updateChan, errChan := r.server.OpenChannel( in.TargetPeerId, nodepubKey, localFundingAmt, lnwire.NewMSatFromSatoshis(remoteInitialBalance), - feePerByte, in.Private, + minHtlc, feePerByte, in.Private, ) select {