mirror of
https://github.com/jwinterm/grin-wallet.git
synced 2026-10-17 23:31:42 +02:00
save_step writes the signed transaction after the wallet state batch has committed, so the write can fail with the tx log entry and the input locks already persisted. store_tx writes a file outside LMDB, as it does for every transaction in the wallet, so the two cannot share a commit without moving stored transactions into the database, which backend.rs already carries a TODO for. Cancelling is the way out: it releases the inputs without reading the stored tx, and nothing has been broadcast because the error returns before the caller posts. Tested by removing the file and cancelling. Also set stored_tx on the entry, as internal::selection does for a standard send. It was left unset, so txs reported no transaction data for every contract even though the transaction was stored.