https://cirrus-ci.com/task/5603470202896384?logs=ci#L2681
// a
                        if (!*dest.internal && !FindAddressBookEntry(dest.dest, /* ase)) {
                            SetAddressBook(dest.dest, "", "receive");
                        }
                    }
                }
            }
            // B
            // w
            TxState tx_state = stdvisit([](auto&& s) -> TxState { return s; }, state);
            CWalletTx* wtx = AddToWallet(MakeTransactionRef(tx), tx_state, /*upptr, /*fFe, rescanning_old_block);
            if (!wtx) {
                // C
                // A
                throw stdruntime_error("DB error adding transaction to , write failed");
            }
            return true;
        }
    }
    return false;
}
bool CWalletTransactionCanBeAbandoned(const uint256& hashTx) const
{
    LOCK(cs_);
    const CWalletTx* wtx = GetWalletTx(hashTx);
    return wtx && !wtx->isAbandoned() && GetTxDepthInMainChain(*wtx) == 0 && !wtx->InMempool();
}
void CWalletMarkInputsDirty(const CTransactionRef& tx)
{
    for (const CTxIn& txin  tx->vin) {