diff --git a/lightningd/chaintopology.c b/lightningd/chaintopology.c index e8364af4a..604d086ad 100644 --- a/lightningd/chaintopology.c +++ b/lightningd/chaintopology.c @@ -202,8 +202,8 @@ static void broadcast_done(struct bitcoind *bitcoind, /* No longer needs to be disconnected if channel dies. */ tal_del_destructor2(otx->channel, clear_otx_channel, otx); - if (otx->failed_or_success) { - otx->failed_or_success(otx->channel, success, msg); + if (otx->finished) { + otx->finished(otx->channel, success, msg); tal_free(otx); } else if (we_broadcast(bitcoind->ld->topology, &otx->txid)) { log_debug( @@ -223,9 +223,9 @@ static void broadcast_done(struct bitcoind *bitcoind, void broadcast_tx(struct chain_topology *topo, struct channel *channel, const struct bitcoin_tx *tx, const char *cmd_id, bool allowhighfees, - void (*failed)(struct channel *channel, - bool success, - const char *err)) + void (*finished)(struct channel *channel, + bool success, + const char *err)) { /* Channel might vanish: topo owns it to start with. */ struct outgoing_tx *otx = tal(topo, struct outgoing_tx); @@ -234,7 +234,7 @@ void broadcast_tx(struct chain_topology *topo, otx->channel = channel; bitcoin_txid(tx, &otx->txid); otx->hextx = tal_hex(otx, rawtx); - otx->failed_or_success = failed; + otx->finished = finished; if (cmd_id) otx->cmd_id = tal_strdup(otx, cmd_id); else diff --git a/lightningd/chaintopology.h b/lightningd/chaintopology.h index 4ba6687eb..7ebddc079 100644 --- a/lightningd/chaintopology.h +++ b/lightningd/chaintopology.h @@ -22,7 +22,7 @@ struct outgoing_tx { const char *hextx; struct bitcoin_txid txid; const char *cmd_id; - void (*failed_or_success)(struct channel *channel, bool success, const char *err); + void (*finished)(struct channel *channel, bool success, const char *err); }; struct block { @@ -178,14 +178,14 @@ u32 penalty_feerate(struct chain_topology *topo); * @tx: the transaction * @cmd_id: the JSON command id which triggered this (or NULL). * @allowhighfees: set to true to override the high-fee checks in the backend. - * @failed: if non-NULL, call that and don't rebroadcast. + * @finished: if non-NULL, call that and don't rebroadcast. */ void broadcast_tx(struct chain_topology *topo, struct channel *channel, const struct bitcoin_tx *tx, const char *cmd_id, bool allowhighfees, - void (*failed)(struct channel *, - bool success, - const char *err)); + void (*finished)(struct channel *, + bool success, + const char *err)); struct chain_topology *new_topology(struct lightningd *ld, struct log *log); void setup_topology(struct chain_topology *topology,