Merge pull request #840 from halseth/openchannel-csv-delay

Add CSV delay flag to openchannel
This commit is contained in:
Olaoluwa Osuntokun authored and GitHub committed 2018-03-31 16:05:08 -07:00
commit 6be6b48e09
8 files changed
+404 -362

No files matched your search

+4 -2
View File
@@ -711,6 +711,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
@@ -784,7 +785,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
@@ -879,6 +880,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
@@ -911,7 +913,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 {