mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 05:12:45 +01:00
lightningd: fix up typesafe-cb bitcoind_getfilteredblock
`const struct filteredblock *` everywhere, as the typesafe_cb_preargs macro required. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
5e36257375
commit
69b7ef1508
@ -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)
|
||||
{
|
||||
|
@ -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) \
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user