mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-07 08:04:23 +01:00
chaintopology: add REORG to logline when tx watch is fired after reorg
This makes clear that txwatch_fire was called with depth=0 when chain tip got removed after a reorg. And now we can test for that.
This commit is contained in:
committed by
Christian Decker
parent
db57d9c5d2
commit
b261c5ba0b
@@ -220,10 +220,12 @@ static bool txw_fire(struct txwatch *txw,
|
||||
else
|
||||
log = txw->topo->log;
|
||||
|
||||
/* We assume zero depth signals a reorganization */
|
||||
log_debug(log,
|
||||
"Got depth change %u->%u for %s",
|
||||
"Got depth change %u->%u for %s%s",
|
||||
txw->depth, depth,
|
||||
type_to_string(tmpctx, struct bitcoin_txid, &txw->txid));
|
||||
type_to_string(tmpctx, struct bitcoin_txid, &txw->txid),
|
||||
depth ? "" : " REORG");
|
||||
txw->depth = depth;
|
||||
r = txw->cb(txw->topo->bitcoind->ld, txw->channel, txid, txw->depth);
|
||||
switch (r) {
|
||||
|
||||
Reference in New Issue
Block a user