MCPcopy Create free account
hub / github.com/ElementsProject/lightning / wallet_have_block

Function wallet_have_block

wallet/wallet.c:3926–3938  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3924}
3925
3926bool wallet_have_block(struct wallet *w, u32 blockheight)
3927{
3928 bool result;
3929 struct db_stmt *stmt = db_prepare_v2(
3930 w->db, SQL("SELECT height FROM blocks WHERE height = ?"));
3931 db_bind_int(stmt, 0, blockheight);
3932 db_query_prepared(stmt);
3933 result = db_step(stmt);
3934 if (result)
3935 db_col_ignore(stmt, "height");
3936 tal_free(stmt);
3937 return result;
3938}
3939
3940struct outpoint *wallet_outpoint_for_scid(struct wallet *w, tal_t *ctx,
3941 const struct short_channel_id *scid)

Callers 2

wallet_filteredblock_addFunction · 0.85
get_txoutFunction · 0.85

Calls 5

db_bind_intFunction · 0.85
db_query_preparedFunction · 0.85
db_stepFunction · 0.85
db_col_ignoreFunction · 0.85
tal_freeFunction · 0.85

Tested by

no test coverage detected