lightning/db
Dusty Daemon 23e80d9e81 PSBT: Change bitcoin_tx routine to use TAKES
`bitcoin_tx_with_psbt` would somewhat opaquely steal the passed `psbt` value.

This caused a bug where code made a `bitcoin_tx` using a psbt without realizing the value was stolen. Because the resulting `bitcoin_tx` was placed in tmpctx it was not immediately clear that using `psbt` afterwards was an error until the tmpctx was cleared — creating a valgrind backtrace far from the actual issue.

Switching to the routine to using TAKES and adding documentation in the header, makes it explicitly clear which operation the user is doing — helping prevent future regressions of this kind.

Changelog-None
2025-05-13 14:52:15 +09:30
..
bindings.c PSBT: Change bitcoin_tx routine to use TAKES 2025-05-13 14:52:15 +09:30
bindings.h wallet: save last known address. 2024-11-25 15:39:13 +10:30
common.h lightningd, pyln-testing: do extra checks to make sure check *cannot* write to db. 2023-10-26 12:59:55 +10:30
db_postgres.c db: remove #if DEVELOPER in favor of runtime flag inside db struct. 2023-09-21 20:08:24 +09:30
db_sqlite3.c db: add generic warn/error function. 2023-07-09 16:49:48 +09:30
exec.c lightningd, pyln-testing: do extra checks to make sure check *cannot* write to db. 2023-10-26 12:59:55 +10:30
exec.h lightningd, pyln-testing: do extra checks to make sure check *cannot* write to db. 2023-10-26 12:59:55 +10:30
Makefile database: pull out database code into a new module 2022-03-05 15:03:34 +10:30
utils.c db: Fix a broken span context pointer 2024-11-24 10:24:31 +10:30
utils.h db: remove #if DEVELOPER in favor of runtime flag inside db struct. 2023-09-21 20:08:24 +09:30