Right now to recover from a backup with an encrypted HD wallet the user must do something like unlock the wallet with a really long time out and manually trigger a rescan,  otherwise they risk missing some keys when auto-topup cannot run.
return ret;
}
stdset<uint256> CWalletGetTxConflicts(const CWalletTx& wtx) const
{
    AssertLockHeld(cs_);
    const uint256 myHash{wtx.GetHash()};
    stdset<uint256> result{GetConflicts(myHash)};
    result.erase(myHash);
    return result;
}
bool CWalletShouldResend() const
{
    // Don't attempt to resubmit if th is configured to not broadcast
    if (!fBroadcastTransactions) return false;
    // During reindex, importing and IBD, old  transactions become
    // unconfirmed. Don't resend them as that would spam other nodes.
    // We only allow forcing mempool submission when not relaying to avoid this spam.
    if (!chain().isReadyToBroadcast()) return false;
    // Do this infrequently and randomly to avoid giving away
    // that these are our transactions.
    if (NodeClocknow() < m_next_resend) return false;
    return true;
}
NodeClocktime_point CWalletGetDefaultNextResend() { return FastRandomContext{}.rand_uniform_delay(NodeClocknow() + 12h, 24h); }
// Resubmit transactions from th to the mempool, optionally asking the
// mempool to relay them. On startup, we will do this for all unconfirmed
// transactions but will not ask the mempool to relay them. We do this on startup
// to ensure that our own mempool is aware of our transactions. There
// is a privacy side effect here as not broadcasting on startup also means that we won't
// inform the world of our 's state, particularly if th (or node) is not