mirror of
https://github.com/aljazceru/lightning.git
synced 2026-02-23 15:04:19 +01:00
reserveinputs: add exclusive flag.
This is the normal case: you only want to reserve inputs which are not already reserved. This saves you iterating through the results and unreserving some if you weren't exclusive. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
9
doc/lightning-reserveinputs.7
generated
9
doc/lightning-reserveinputs.7
generated
@@ -3,7 +3,7 @@
|
||||
lightning-reserveinputs - Construct a transaction and reserve the UTXOs it spends
|
||||
.SH SYNOPSIS
|
||||
|
||||
\fBreserveinputs\fR \fIpsbt\fR
|
||||
\fBreserveinputs\fR \fIpsbt\fR [\fIexclusive\fR]
|
||||
|
||||
.SH DESCRIPTION
|
||||
|
||||
@@ -11,6 +11,11 @@ The \fBreserveinputs\fR RPC command places (or increases) reservations on any
|
||||
inputs specified in \fIpsbt\fR which are known to lightningd\. It will fail
|
||||
with an error it any of the inputs are known to be spent\.
|
||||
|
||||
|
||||
Normally the command will fail (with no reservations made) if an input
|
||||
is already reserved\. If \fIexclusive\fR is set to \fIFalse\fR, then existing
|
||||
reservations are simply extended, rather than causing failure\.
|
||||
|
||||
.SH RETURN VALUE
|
||||
|
||||
On success, an \fIreservations\fR array is returned, with an entry for each input
|
||||
@@ -37,7 +42,7 @@ The following error codes may occur:
|
||||
|
||||
.RS
|
||||
.IP \[bu]
|
||||
-32602: Invalid parameter, such as specifying a spent input in \fIpsbt\fR\.
|
||||
-32602: Invalid parameter, such as specifying a spent/reserved input in \fIpsbt\fR\.
|
||||
|
||||
.RE
|
||||
.SH AUTHOR
|
||||
|
||||
@@ -4,7 +4,7 @@ lightning-reserveinputs -- Construct a transaction and reserve the UTXOs it spen
|
||||
SYNOPSIS
|
||||
--------
|
||||
|
||||
**reserveinputs** *psbt*
|
||||
**reserveinputs** *psbt* [*exclusive*]
|
||||
|
||||
DESCRIPTION
|
||||
-----------
|
||||
@@ -13,6 +13,10 @@ The **reserveinputs** RPC command places (or increases) reservations on any
|
||||
inputs specified in *psbt* which are known to lightningd. It will fail
|
||||
with an error it any of the inputs are known to be spent.
|
||||
|
||||
Normally the command will fail (with no reservations made) if an input
|
||||
is already reserved. If *exclusive* is set to *False*, then existing
|
||||
reservations are simply extended, rather than causing failure.
|
||||
|
||||
|
||||
RETURN VALUE
|
||||
------------
|
||||
@@ -29,7 +33,7 @@ which was reserved:
|
||||
On failure, an error is reported and no UTXOs are reserved.
|
||||
|
||||
The following error codes may occur:
|
||||
- -32602: Invalid parameter, such as specifying a spent input in *psbt*.
|
||||
- -32602: Invalid parameter, such as specifying a spent/reserved input in *psbt*.
|
||||
|
||||
AUTHOR
|
||||
------
|
||||
|
||||
Reference in New Issue
Block a user