diff --git a/lightningd/bitcoind.c b/lightningd/bitcoind.c index 50c7b068e..be2f671d4 100644 --- a/lightningd/bitcoind.c +++ b/lightningd/bitcoind.c @@ -787,7 +787,7 @@ void bitcoind_gettxout(struct bitcoind *bitcoind, * process the various steps. */ struct filteredblock_call { struct list_node list; - void (*cb)(struct bitcoind *bitcoind, struct filteredblock *fb, + void (*cb)(struct bitcoind *bitcoind, const struct filteredblock *fb, void *arg); void *arg; @@ -914,7 +914,7 @@ process_getfiltered_block_final(struct bitcoind *bitcoind, void bitcoind_getfilteredblock_(struct bitcoind *bitcoind, u32 height, void (*cb)(struct bitcoind *bitcoind, - struct filteredblock *fb, + const struct filteredblock *fb, void *arg), void *arg) { diff --git a/lightningd/bitcoind.h b/lightningd/bitcoind.h index 689d7fed2..cdc43f72b 100644 --- a/lightningd/bitcoind.h +++ b/lightningd/bitcoind.h @@ -153,7 +153,7 @@ void bitcoind_getblockhash_(struct bitcoind *bitcoind, void bitcoind_getfilteredblock_(struct bitcoind *bitcoind, u32 height, void (*cb)(struct bitcoind *bitcoind, - struct filteredblock *fb, + const struct filteredblock *fb, void *arg), void *arg); #define bitcoind_getfilteredblock(bitcoind_, height, cb, arg) \ diff --git a/lightningd/gossip_control.c b/lightningd/gossip_control.c index 6001223d2..00a2dee39 100644 --- a/lightningd/gossip_control.c +++ b/lightningd/gossip_control.c @@ -60,10 +60,9 @@ static void got_txout(struct bitcoind *bitcoind, } static void got_filteredblock(struct bitcoind *bitcoind, - struct filteredblock *fb, - void *arg) + const struct filteredblock *fb, + struct short_channel_id *scid) { - struct short_channel_id *scid = (struct short_channel_id *)arg; struct filteredblock_outpoint *fbo = NULL, *o; struct bitcoin_tx_output txo; diff --git a/wallet/wallet.c b/wallet/wallet.c index 7f09fe774..11c1919d5 100644 --- a/wallet/wallet.c +++ b/wallet/wallet.c @@ -2411,7 +2411,7 @@ void wallet_utxoset_add(struct wallet *w, const struct bitcoin_tx *tx, outpointfilter_add(w->utxoset_outpoints, &txid, outnum); } -void wallet_filteredblock_add(struct wallet *w, struct filteredblock *fb) +void wallet_filteredblock_add(struct wallet *w, const struct filteredblock *fb) { if (wallet_have_block(w, fb->height)) return; diff --git a/wallet/wallet.h b/wallet/wallet.h index 09fa42c63..df247e862 100644 --- a/wallet/wallet.h +++ b/wallet/wallet.h @@ -1170,6 +1170,6 @@ struct wallet_transaction *wallet_transactions_get(struct wallet *w, const tal_t * * This can be used to backfill the blocks and still unspent UTXOs that were before our wallet birth height. */ -void wallet_filteredblock_add(struct wallet *w, struct filteredblock *fb); +void wallet_filteredblock_add(struct wallet *w, const struct filteredblock *fb); #endif /* LIGHTNING_WALLET_WALLET_H */