rpcserver: pass incoming RemoteCsvDelay to server.OpenChannel

This commit is contained in:
Johan T. Halseth 2018-03-14 14:15:44 +01:00
parent 6f98803967
commit 938aefb573
No known key found for this signature in database
GPG Key ID: 15BAADA29DA20D26

View File

@ -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 {