cln/db
Sangbida Chaudhuri dbbd757972 lightningd: add watchman storage and persistence skeleton
Introduce the minimal storage scaffolding for the watchman module:

- db_set_blobvar / db_get_blobvar helpers for persisting binary
  values (e.g. block hashes) in the SQL `vars` table.
- load_tip(): recover last_processed_height and last_processed_hash
  from the wallet db.
- apply_rescan(): honour --rescan by adjusting the loaded tip
  downward (negative = absolute height, positive = N blocks back).
- watchman_new(): allocate the struct, initialise the pending-op
  array, and call load_tip + apply_rescan.

Wire the watchman field into struct lightningd via a forward
declaration; instantiation at startup lands in a later commit
along with the rest of the wiring.
2026-06-11 00:31:54 +10:00
..
bindings.c common: correctly refuse to accept wireaddr with port == 0. 2026-04-30 12:17:43 +09:30
bindings.h db: helper for binding/reading bitcoin_outpoint. 2025-08-19 13:37:50 +09:30
common.h db: add STRICT tables with migration for old databases 2026-02-23 15:55:55 +10:30
db_postgres.c db: support mode where we don't want to create the db. 2025-08-19 13:37:50 +09:30
db_sqlite3.c db: add STRICT tables with migration for old databases 2026-02-23 15:55:55 +10:30
exec.c lightningd: add watchman storage and persistence skeleton 2026-06-11 00:31:54 +10:00
exec.h lightningd: add watchman storage and persistence skeleton 2026-06-11 00:31:54 +10:00
Makefile database: pull out database code into a new module 2022-03-05 15:03:34 +10:30
utils.c common: add tal_free_if_taken() helper for common case. 2026-03-29 14:35:54 +10:30
utils.h db: support mode where we don't want to create the db. 2025-08-19 13:37:50 +09:30