`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 |
||
|---|---|---|
| .. | ||
| bindings.c | ||
| bindings.h | ||
| common.h | ||
| db_postgres.c | ||
| db_sqlite3.c | ||
| exec.c | ||
| exec.h | ||
| Makefile | ||
| utils.c | ||
| utils.h | ||