Files
palladum-lightning/plugins/bkpr/blockheights.h
Rusty Russell c5e359c7ee bkpr: add in-mem & datastore storage for external blockheights.
We won't be able to "UPDATE chain_events", so keep a separate record
of these blockheights, and lookup that when the blockheight is 0.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-08-19 13:37:50 +09:30

20 lines
585 B
C

#ifndef LIGHTNING_PLUGINS_BKPR_BLOCKHEIGHTS_H
#define LIGHTNING_PLUGINS_BKPR_BLOCKHEIGHTS_H
#include "config.h"
struct command;
struct bkpr;
struct bitcoin_txid;
void add_blockheight(struct command *cmd,
struct bkpr *bkpr,
const struct bitcoin_txid *txid,
u32 blockheight);
/* Returns blockheight for this txid, or 0 if not found. */
u32 find_blockheight(const struct bkpr *bkpr, const struct bitcoin_txid *txid);
struct blockheights *init_blockheights(const tal_t *ctx,
struct command *init_cmd);
#endif /* LIGHTNING_PLUGINS_BKPR_BLOCKHEIGHTS_H */