Browse Source

chain_topology: remove unneeded struct outgoing_tx topo pointer.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ppa-0.6.1
Rusty Russell 7 years ago
committed by Christian Decker
parent
commit
3332cd6395
  1. 3
      lightningd/chaintopology.c
  2. 2
      lightningd/chaintopology.h

3
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);

2
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 {

Loading…
Cancel
Save