mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-22 06:41:44 +01:00
chaintopology: fix crash if bcli doesn't include errmsg.
Interestingly, we required that "sendrawtx" include "errmsg" field even
on success, otherwise we crashed in broadcast_remainder.
We only actually insist on an "errmsg" if success is false. And this
logic here is weird (the !success) was added by darosior in
947f5ddde1
, which makes the msg checks redundant.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
fd7d1a1cc0
commit
11a4d46c44
1 changed files with 1 additions and 4 deletions
|
@ -136,10 +136,7 @@ static void broadcast_remainder(struct bitcoind *bitcoind,
|
|||
bool success, const char *msg,
|
||||
struct txs_to_broadcast *txs)
|
||||
{
|
||||
/* These are expected. */
|
||||
if (strstr(msg, "txn-mempool-conflict")
|
||||
|| strstr(msg, "transaction already in block chain")
|
||||
|| !success)
|
||||
if (!success)
|
||||
log_debug(bitcoind->log,
|
||||
"Expected error broadcasting tx %s: %s",
|
||||
txs->txs[txs->cursor], msg);
|
||||
|
|
Loading…
Add table
Reference in a new issue