mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-24 01:24:26 +01:00
pytest: test reserve and unreserve.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -1107,22 +1107,19 @@ class LightningRpc(UnixDomainSocketRpc):
|
||||
}
|
||||
return self.call("txsend", payload)
|
||||
|
||||
def reserveinputs(self, outputs, feerate=None, minconf=None, utxos=None):
|
||||
def reserveinputs(self, psbt, exclusive=True):
|
||||
"""
|
||||
Reserve UTXOs and return a psbt for a 'stub' transaction that
|
||||
spends the reserved UTXOs.
|
||||
Reserve any inputs in this psbt.
|
||||
"""
|
||||
payload = {
|
||||
"outputs": outputs,
|
||||
"feerate": feerate,
|
||||
"minconf": minconf,
|
||||
"utxos": utxos,
|
||||
"psbt": psbt,
|
||||
"exclusive": exclusive,
|
||||
}
|
||||
return self.call("reserveinputs", payload)
|
||||
|
||||
def unreserveinputs(self, psbt):
|
||||
"""
|
||||
Unreserve UTXOs that were previously reserved.
|
||||
Unreserve (or reduce reservation) on any UTXOs in this psbt were previously reserved.
|
||||
"""
|
||||
payload = {
|
||||
"psbt": psbt,
|
||||
|
||||
Reference in New Issue
Block a user