This is to track the regression introduced in master, which needs fixing for 0.14. See #9240, #9371, etc.
{
    AssertLockHeld(cs_wallet); 
    setLockedCoins.erase(output);
}
void CWallet::UnlockAllCoins()
{
    AssertLockHeld(cs_wallet); 
    setLockedCoins.clear();
}
bool CWallet::IsLockedCoin(uint256 hash, unsigned int n) const
{
    AssertLockHeld(cs_wallet); 
    COutPoint outpt(hash, n);
    return (setLockedCoins.count(outpt) > 0);
}
void CWallet::ListLockedCoins(std::vector<COutPoint>& vOutpts)
{
    AssertLockHeld(cs_wallet); 
    for (std::set<COutPoint>::iterator it = setLockedCoins.begin();
         it != setLockedCoins.end(); it++) {
        COutPoint outpt = (*it);
        vOutpts.push_back(outpt);
    }
}
 
class CAffectedKeysVisitor : public boost::static_visitor<void> {