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

Function wallet_blocks_rollback

wallet/wallet.c:3812–3818  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3810}
3811
3812void wallet_blocks_rollback(struct wallet *w, u32 height)
3813{
3814 struct db_stmt *stmt = db_prepare_v2(w->db, SQL("DELETE FROM blocks "
3815 "WHERE height > ?"));
3816 db_bind_int(stmt, 0, height);
3817 db_exec_prepared_v2(take(stmt));
3818}
3819
3820bool wallet_outpoint_spend(struct wallet *w, const tal_t *ctx, const u32 blockheight,
3821 const struct bitcoin_outpoint *outpoint)

Callers 1

check_blockcountFunction · 0.85

Calls 2

db_bind_intFunction · 0.85
db_exec_prepared_v2Function · 0.85

Tested by

no test coverage detected