funder: don't re-reserve utxos on retries

This way unreserving the PSBT will work as intended, and we don't have
to keep track of how many times we've called reserved for any one input.

Technically we're supposed to not reserve inputs at *all* while doing
opens, this moves us slightly closer to that.
This commit is contained in:
niftynei 2023-07-29 20:43:28 -05:00 committed by Rusty Russell
parent 955afdeea8
commit 73a67fbb3e

View file

@ -695,6 +695,8 @@ listfunds_success(struct command *cmd,
committed_funds,
avail_utxos);
json_add_bool(req->js, "reservedok", true);
/* We don't re-reserve any UTXOS :) */
json_add_num(req->js, "reserve", 0);
} else {
req = jsonrpc_request_start(cmd->plugin, cmd,
"fundpsbt",