mirror of
https://github.com/aljazceru/lightning.git
synced 2026-02-23 15:04:19 +01:00
lightningd: don't let them fundpsbt below emergency reserve.
This is the simple version which always tries to keep some sats if we have an anchor channel. Turns out that we need something more sophisticated for multifundchannel, so that's next. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-Changed: JSON-RPC: `withdraw` will refuse to spend funds below `min-emergency-msat` if we have any anchor channels (and `all` will be reduced appropriately). Changelog-Changed: JSON-RPC: `fundpsbt` and `utxopsbt` will refuse to spend funds below `min-emergency-msat` if we have any anchor channels.
This commit is contained in:
@@ -63,6 +63,7 @@ enum jsonrpc_errcode {
|
||||
FUNDING_V2_NOT_SUPPORTED = 310,
|
||||
FUNDING_UNKNOWN_CHANNEL = 311,
|
||||
FUNDING_STATE_INVALID = 312,
|
||||
FUND_CANNOT_AFFORD_WITH_EMERGENCY = 313,
|
||||
|
||||
/* `connect` errors */
|
||||
CONNECT_NO_KNOWN_ADDRESS = 400,
|
||||
|
||||
Reference in New Issue
Block a user