diff --git a/lightningd/chaintopology.h b/lightningd/chaintopology.h index 65ad3086a..0e6a771f0 100644 --- a/lightningd/chaintopology.h +++ b/lightningd/chaintopology.h @@ -155,7 +155,7 @@ u32 penalty_feerate(struct chain_topology *topo); * If failed is non-NULL, call that and don't rebroadcast. */ void broadcast_tx(struct chain_topology *topo, struct channel *channel, const struct bitcoin_tx *tx, - void (*failed)(struct channel *channel, + void (*failed)(struct channel *, bool success, const char *err)); /* Like the above, but with an additional `allowhighfees` parameter. @@ -163,7 +163,7 @@ void broadcast_tx(struct chain_topology *topo, void broadcast_tx_ahf(struct chain_topology *topo, struct channel *channel, const struct bitcoin_tx *tx, bool allowhighfees, - void (*failed)(struct channel *channel, + void (*failed)(struct channel *, bool success, const char *err)); @@ -194,8 +194,8 @@ static inline bool topology_synced(const struct chain_topology *topo) */ void topology_add_sync_waiter_(const tal_t *ctx, struct chain_topology *topo, - void (*cb)(struct chain_topology *topo, - void *arg), + void (*cb)(struct chain_topology *, + void *), void *arg); #define topology_add_sync_waiter(ctx, topo, cb, arg) \ topology_add_sync_waiter_((ctx), (topo), \ diff --git a/lightningd/test/run-invoice-select-inchan.c b/lightningd/test/run-invoice-select-inchan.c index 52308bedf..b3e7395a2 100644 --- a/lightningd/test/run-invoice-select-inchan.c +++ b/lightningd/test/run-invoice-select-inchan.c @@ -16,9 +16,9 @@ struct channel *any_channel_by_scid(struct lightningd *ld UNNEEDED, /* Generated stub for bitcoind_getutxout_ */ void bitcoind_getutxout_(struct bitcoind *bitcoind UNNEEDED, const struct bitcoin_outpoint *outpoint UNNEEDED, - void (*cb)(struct bitcoind *bitcoind UNNEEDED, - const struct bitcoin_tx_output *txout UNNEEDED, - void *arg) UNNEEDED, + void (*cb)(struct bitcoind * UNNEEDED, + const struct bitcoin_tx_output * UNNEEDED, + void *) UNNEEDED, void *arg UNNEEDED) { fprintf(stderr, "bitcoind_getutxout_ called!\n"); abort(); } /* Generated stub for bolt11_decode */ @@ -50,7 +50,7 @@ char *bolt11_encode_(const tal_t *ctx UNNEEDED, /* Generated stub for broadcast_tx */ void broadcast_tx(struct chain_topology *topo UNNEEDED, struct channel *channel UNNEEDED, const struct bitcoin_tx *tx UNNEEDED, - void (*failed)(struct channel *channel UNNEEDED, + void (*failed)(struct channel * UNNEEDED, bool success UNNEEDED, const char *err)) { fprintf(stderr, "broadcast_tx called!\n"); abort(); } @@ -911,7 +911,7 @@ struct txwatch *watch_txid(const tal_t *ctx UNNEEDED, struct channel *channel UNNEEDED, const struct bitcoin_txid *txid UNNEEDED, enum watch_result (*cb)(struct lightningd *ld UNNEEDED, - struct channel *channel UNNEEDED, + struct channel * UNNEEDED, const struct bitcoin_txid * UNNEEDED, const struct bitcoin_tx * UNNEEDED, unsigned int depth)) @@ -921,7 +921,7 @@ struct txowatch *watch_txo(const tal_t *ctx UNNEEDED, struct chain_topology *topo UNNEEDED, struct channel *channel UNNEEDED, const struct bitcoin_outpoint *outpoint UNNEEDED, - enum watch_result (*cb)(struct channel *channel UNNEEDED, + enum watch_result (*cb)(struct channel * UNNEEDED, const struct bitcoin_tx *tx UNNEEDED, size_t input_num UNNEEDED, const struct block *block)) diff --git a/lightningd/watch.c b/lightningd/watch.c index 48b5d7d83..05a54c651 100644 --- a/lightningd/watch.c +++ b/lightningd/watch.c @@ -123,9 +123,9 @@ struct txwatch *watch_txid(const tal_t *ctx, struct channel *channel, const struct bitcoin_txid *txid, enum watch_result (*cb)(struct lightningd *ld, - struct channel *channel, - const struct bitcoin_txid *txid, - const struct bitcoin_tx *tx, + struct channel *, + const struct bitcoin_txid *, + const struct bitcoin_tx *, unsigned int depth)) { struct txwatch *w; @@ -189,7 +189,7 @@ struct txowatch *watch_txo(const tal_t *ctx, struct chain_topology *topo, struct channel *channel, const struct bitcoin_outpoint *outpoint, - enum watch_result (*cb)(struct channel *channel, + enum watch_result (*cb)(struct channel *channel_, const struct bitcoin_tx *tx, size_t input_num, const struct block *block)) diff --git a/lightningd/watch.h b/lightningd/watch.h index 35d818e89..dbdd43d4e 100644 --- a/lightningd/watch.h +++ b/lightningd/watch.h @@ -35,7 +35,7 @@ struct txwatch *watch_txid(const tal_t *ctx, struct channel *channel, const struct bitcoin_txid *txid, enum watch_result (*cb)(struct lightningd *ld, - struct channel *channel, + struct channel *, const struct bitcoin_txid *, const struct bitcoin_tx *, unsigned int depth)); @@ -45,7 +45,7 @@ struct txwatch *watch_tx(const tal_t *ctx, struct channel *channel, const struct bitcoin_tx *tx, enum watch_result (*cb)(struct lightningd *ld, - struct channel *channel, + struct channel *, const struct bitcoin_txid *, const struct bitcoin_tx *, unsigned int depth)); @@ -54,7 +54,7 @@ struct txowatch *watch_txo(const tal_t *ctx, struct chain_topology *topo, struct channel *channel, const struct bitcoin_outpoint *outpoint, - enum watch_result (*cb)(struct channel *channel, + enum watch_result (*cb)(struct channel *, const struct bitcoin_tx *tx, size_t input_num, const struct block *block)); diff --git a/wallet/test/run-wallet.c b/wallet/test/run-wallet.c index 0715963d6..29593e16f 100644 --- a/wallet/test/run-wallet.c +++ b/wallet/test/run-wallet.c @@ -52,9 +52,9 @@ size_t bigsize_put(u8 buf[BIGSIZE_MAX_LEN] UNNEEDED, bigsize_t v UNNEEDED) /* Generated stub for bitcoind_getutxout_ */ void bitcoind_getutxout_(struct bitcoind *bitcoind UNNEEDED, const struct bitcoin_outpoint *outpoint UNNEEDED, - void (*cb)(struct bitcoind *bitcoind UNNEEDED, - const struct bitcoin_tx_output *txout UNNEEDED, - void *arg) UNNEEDED, + void (*cb)(struct bitcoind * UNNEEDED, + const struct bitcoin_tx_output * UNNEEDED, + void *) UNNEEDED, void *arg UNNEEDED) { fprintf(stderr, "bitcoind_getutxout_ called!\n"); abort(); } /* Generated stub for blinding_hash_e_and_ss */ @@ -70,7 +70,7 @@ bool blinding_next_pubkey(const struct pubkey *pk UNNEEDED, /* Generated stub for broadcast_tx */ void broadcast_tx(struct chain_topology *topo UNNEEDED, struct channel *channel UNNEEDED, const struct bitcoin_tx *tx UNNEEDED, - void (*failed)(struct channel *channel UNNEEDED, + void (*failed)(struct channel * UNNEEDED, bool success UNNEEDED, const char *err)) { fprintf(stderr, "broadcast_tx called!\n"); abort(); } @@ -711,8 +711,8 @@ void subkey_from_hmac(const char *prefix UNNEEDED, /* Generated stub for topology_add_sync_waiter_ */ void topology_add_sync_waiter_(const tal_t *ctx UNNEEDED, struct chain_topology *topo UNNEEDED, - void (*cb)(struct chain_topology *topo UNNEEDED, - void *arg) UNNEEDED, + void (*cb)(struct chain_topology * UNNEEDED, + void *) UNNEEDED, void *arg UNNEEDED) { fprintf(stderr, "topology_add_sync_waiter_ called!\n"); abort(); } /* Generated stub for towire_channeld_config_channel */ @@ -847,7 +847,7 @@ struct txwatch *watch_txid(const tal_t *ctx UNNEEDED, struct channel *channel UNNEEDED, const struct bitcoin_txid *txid UNNEEDED, enum watch_result (*cb)(struct lightningd *ld UNNEEDED, - struct channel *channel UNNEEDED, + struct channel * UNNEEDED, const struct bitcoin_txid * UNNEEDED, const struct bitcoin_tx * UNNEEDED, unsigned int depth)) @@ -857,7 +857,7 @@ struct txowatch *watch_txo(const tal_t *ctx UNNEEDED, struct chain_topology *topo UNNEEDED, struct channel *channel UNNEEDED, const struct bitcoin_outpoint *outpoint UNNEEDED, - enum watch_result (*cb)(struct channel *channel UNNEEDED, + enum watch_result (*cb)(struct channel * UNNEEDED, const struct bitcoin_tx *tx UNNEEDED, size_t input_num UNNEEDED, const struct block *block))