From 3332cd6395941f575d29c51166e802da58edf127 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Wed, 10 Jan 2018 13:13:23 +1030 Subject: [PATCH] chain_topology: remove unneeded struct outgoing_tx topo pointer. Signed-off-by: Rusty Russell --- lightningd/chaintopology.c | 3 +-- lightningd/chaintopology.h | 2 -- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/lightningd/chaintopology.c b/lightningd/chaintopology.c index 809316511..451226062 100644 --- a/lightningd/chaintopology.c +++ b/lightningd/chaintopology.c @@ -236,7 +236,7 @@ static void broadcast_done(struct bitcoind *bitcoind, } else { /* For continual rebroadcasting, until peer freed. */ tal_steal(otx->peer, otx); - list_add_tail(&otx->topo->outgoing_txs, &otx->list); + list_add_tail(&bitcoind->ld->topology->outgoing_txs, &otx->list); tal_add_destructor(otx, destroy_outgoing_tx); } } @@ -254,7 +254,6 @@ void broadcast_tx(struct chain_topology *topo, bitcoin_txid(tx, &otx->txid); otx->hextx = tal_hex(otx, rawtx); otx->failed = failed; - otx->topo = topo; tal_free(rawtx); tal_add_destructor2(peer, clear_otx_peer, otx); diff --git a/lightningd/chaintopology.h b/lightningd/chaintopology.h index 802ef63ff..6f5c24b0f 100644 --- a/lightningd/chaintopology.h +++ b/lightningd/chaintopology.h @@ -32,8 +32,6 @@ struct outgoing_tx { const char *hextx; struct bitcoin_txid txid; void (*failed)(struct peer *peer, int exitstatus, const char *err); - /* FIXME: Remove this. */ - struct chain_topology *topo; }; struct block {