From 938aefb573fee72c4ac9f143f70aaa2e21c893c0 Mon Sep 17 00:00:00 2001 From: "Johan T. Halseth" Date: Wed, 14 Mar 2018 14:15:44 +0100 Subject: [PATCH] rpcserver: pass incoming RemoteCsvDelay to server.OpenChannel --- rpcserver.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rpcserver.go b/rpcserver.go index 2a8c6d09a..a23e28e19 100644 --- a/rpcserver.go +++ b/rpcserver.go @@ -712,6 +712,7 @@ func (r *rpcServer) OpenChannel(in *lnrpc.OpenChannelRequest, localFundingAmt := btcutil.Amount(in.LocalFundingAmount) remoteInitialBalance := btcutil.Amount(in.PushSat) minHtlc := lnwire.MilliSatoshi(in.MinHtlcMsat) + remoteCsvDelay := uint16(in.RemoteCsvDelay) // Ensure that the initial balance of the remote party (if pushing // satoshis) does not exceed the amount the local party has requested @@ -785,7 +786,7 @@ func (r *rpcServer) OpenChannel(in *lnrpc.OpenChannelRequest, updateChan, errChan := r.server.OpenChannel( nodePubKey, localFundingAmt, lnwire.NewMSatFromSatoshis(remoteInitialBalance), - minHtlc, feeRate, in.Private, + minHtlc, feeRate, in.Private, remoteCsvDelay, ) var outpoint wire.OutPoint @@ -880,6 +881,7 @@ func (r *rpcServer) OpenChannelSync(ctx context.Context, localFundingAmt := btcutil.Amount(in.LocalFundingAmount) remoteInitialBalance := btcutil.Amount(in.PushSat) minHtlc := lnwire.MilliSatoshi(in.MinHtlcMsat) + remoteCsvDelay := uint16(in.RemoteCsvDelay) // Ensure that the initial balance of the remote party (if pushing // satoshis) does not exceed the amount the local party has requested @@ -912,7 +914,7 @@ func (r *rpcServer) OpenChannelSync(ctx context.Context, updateChan, errChan := r.server.OpenChannel( nodepubKey, localFundingAmt, lnwire.NewMSatFromSatoshis(remoteInitialBalance), - minHtlc, feeRate, in.Private, + minHtlc, feeRate, in.Private, remoteCsvDelay, ) select {