taproot-assets
taproot-assets copied to clipboard
tapgarden: defund the PSBT
Spinoff of #828.
Some in-flight PRs (#787) add logic for 'unwinding' a call to FundPsbt
. Currently this is only being used in the tapfreighter / transfer logic:
https://github.com/lightninglabs/taproot-assets/pull/787/commits/23bc1756aa4585683ed5ec38da7851dafe3da6c7
Since the minting logic funds all batches with FundPsbt
, we should also unwind batch funding and unlock anchor inputs on batch funding failure, or other failure points before batch broadcast.
This may involve DB changes to record the LockedUTXOs
of a minting batch. Right now this is equivalent to all inputs, but once #721 is implemented that may not be true.