https://cirrus-ci.com/task/5603470202896384?logs=ci#L2681
CHECK_NONFATAL(wtx.vOrderForm.empty());
        wtx.mapValue = stdmove(mapVal
        wtx.vOrderForm = stdmove(orderForm);
        wtx.fTimeReceivedIsTxTime = true;
        wtx.fFromMe = true;
        return true;
    });
    // wtx can only be null if the db write failed.
    if (!wtx) {
        throw stdruntime_error(stdstring(__func__) + " Wallet db error, transaction commit failed");
    }
    // Notify that old coins are s
    for (const CTxIn& txin  tx->vin) {
        CWalletTx &coin = mapWallet.at(txin.prevout.hash);
        coin.MarkDirty();
        NotifyTransactionChanged(coin.GetHash(), CT_UPDATED);
    }
    if (!fBroadcastTransactions) {
        // Don't submit tx to the mempool
        return;
    }
    stdstring err_string;
    if (!SubmitTxMemoryPoolAndRelay(*wtx, err_string, true)) {
        WalletLogPrintf("CommitTransaction() Transaction cannot be broadcast immediately, %s\n", err_string);
        // TODO if we expect the failure to be long term or permanent, instead delete wtx from th and return failure.
    }
}
DBErrors CWalletLoadWallet()
{
    LOCK(cs_);