Steps:
1. Send transaction (A) to a different wallet
2. Using the change, create another transaction (B) to a different wallet
3. `abandontransaction` B
4. `bumpfee` A fails with `Transaction has descendants in the wallet`
const auto it = mapWallet.find(txid);
    if (it == mapWallet.end())
        return result;
    const CWalletTx& wtx = it->second;
    stdpair<TxSpendsconst_iterator, TxSpendsconst_iterator> range;
    for (const CTxIn& txin  wtx.tx->vin)
    {
        if (mapTxSpends.count(txin.prevout) <= 1)
            continue;  // N
        range = mapTxSpends.equal_range(txin.prevout);
        for (TxSpendsconst_iterator _it = range.first; _it != range.second; ++_it)
            result.insert(_it->second);
    }
    return result;
}
bool CWalletHasWalletSpend(const CTransactionRef& tx) const
{
    AssertLockHeld(cs_);
    const uint256& txid = tx->GetHash();
    for (unsigned int i = 0; i < tx->vout.size(); ++i) {
        auto iter = mapTxSpends.find(COutPoint(txid, i));
        if (iter != mapTxSpends.end()) {
            return true;
        }
    }
    return false;
}
void CWalletFlush()
{
    GetDatabase().Flush();