mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-15 20:09:18 +01:00
bcli: Accept "already in chain" errors as success
This commit is contained in:
parent
39b71ef4a1
commit
910e79ddb5
1 changed files with 5 additions and 1 deletions
|
@ -16,6 +16,7 @@
|
|||
* This is how many request for each priority level we have.
|
||||
*/
|
||||
#define BITCOIND_MAX_PARALLEL 4
|
||||
#define RPC_TRANSACTION_ALREADY_IN_CHAIN -27
|
||||
|
||||
enum bitcoind_prio {
|
||||
BITCOIND_LOW_PRIO,
|
||||
|
@ -489,7 +490,10 @@ static struct command_result *process_sendrawtransaction(struct bitcoin_cli *bcl
|
|||
bcli->output);
|
||||
|
||||
response = jsonrpc_stream_success(bcli->cmd);
|
||||
json_add_bool(response, "success", *bcli->exitstatus == 0);
|
||||
json_add_bool(response, "success",
|
||||
*bcli->exitstatus == 0 ||
|
||||
*bcli->exitstatus ==
|
||||
RPC_TRANSACTION_ALREADY_IN_CHAIN);
|
||||
json_add_string(response, "errmsg",
|
||||
*bcli->exitstatus ?
|
||||
tal_strndup(bcli->cmd,
|
||||
|
|
Loading…
Add table
Reference in a new issue