mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +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:
committed by
Christian Decker
parent
fd7d1a1cc0
commit
11a4d46c44
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user