mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-03-26 08:55:59 +01:00
Merge pull request #6945 from ellemouton/errOnZeroLocalAmt
rpcserver: error on zero local balance in openchan req
This commit is contained in:
commit
905dfed6dd
2 changed files with 8 additions and 0 deletions
|
@ -27,6 +27,9 @@ transaction](https://github.com/lightningnetwork/lnd/pull/6730).
|
|||
method to the RPC to allow subscribing to updates from any inflight payment.
|
||||
Similar to TrackPaymentV2, but for any inflight payment.
|
||||
|
||||
* [Catch and throw an error](https://github.com/lightningnetwork/lnd/pull/6945)
|
||||
during `openchannel` if the local funding amount given is zero.
|
||||
|
||||
## Wallet
|
||||
|
||||
* [Allows Taproot public keys and tap scripts to be imported as watch-only
|
||||
|
|
|
@ -1913,6 +1913,11 @@ func (r *rpcServer) parseOpenChannelReq(in *lnrpc.OpenChannelRequest,
|
|||
|
||||
globalFeatureSet := r.server.featureMgr.Get(feature.SetNodeAnn)
|
||||
|
||||
// Ensure that a local funding amount has been specified.
|
||||
if localFundingAmt == 0 {
|
||||
return nil, fmt.Errorf("local funding amount must be non-zero")
|
||||
}
|
||||
|
||||
// Ensure that the initial balance of the remote party (if pushing
|
||||
// satoshis) does not exceed the amount the local party has requested
|
||||
// for funding.
|
||||
|
|
Loading…
Add table
Reference in a new issue