rpcserver: add min_htlc_msat parameter to OpenChannel and OpenChannelSync

This commit is contained in:
Johan T. Halseth committed 2018-01-12 22:56:38 +01:00
1 parent 84e5adcdd0
commit f3dff2ae97
1 file changed
+4 -2
+4 -2
View File
@@ -551,6 +551,7 @@ func (r *rpcServer) OpenChannel(in *lnrpc.OpenChannelRequest,
localFundingAmt := btcutil.Amount(in.LocalFundingAmount) localFundingAmt := btcutil.Amount(in.LocalFundingAmount)
remoteInitialBalance := btcutil.Amount(in.PushSat) remoteInitialBalance := btcutil.Amount(in.PushSat)
minHtlc := lnwire.MilliSatoshi(in.MinHtlcMsat)
// Ensure that the initial balance of the remote party (if pushing // Ensure that the initial balance of the remote party (if pushing
// satoshis) does not exceed the amount the local party has requested // 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( updateChan, errChan := r.server.OpenChannel(
in.TargetPeerId, nodePubKey, localFundingAmt, in.TargetPeerId, nodePubKey, localFundingAmt,
lnwire.NewMSatFromSatoshis(remoteInitialBalance), lnwire.NewMSatFromSatoshis(remoteInitialBalance),
feePerByte, in.Private, minHtlc, feePerByte, in.Private,
) )
var outpoint wire.OutPoint var outpoint wire.OutPoint
@@ -722,6 +723,7 @@ func (r *rpcServer) OpenChannelSync(ctx context.Context,
localFundingAmt := btcutil.Amount(in.LocalFundingAmount) localFundingAmt := btcutil.Amount(in.LocalFundingAmount)
remoteInitialBalance := btcutil.Amount(in.PushSat) remoteInitialBalance := btcutil.Amount(in.PushSat)
minHtlc := lnwire.MilliSatoshi(in.MinHtlcMsat)
// Ensure that the initial balance of the remote party (if pushing // Ensure that the initial balance of the remote party (if pushing
// satoshis) does not exceed the amount the local party has requested // 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( updateChan, errChan := r.server.OpenChannel(
in.TargetPeerId, nodepubKey, localFundingAmt, in.TargetPeerId, nodepubKey, localFundingAmt,
lnwire.NewMSatFromSatoshis(remoteInitialBalance), lnwire.NewMSatFromSatoshis(remoteInitialBalance),
feePerByte, in.Private, minHtlc, feePerByte, in.Private,
) )
select { select {