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.
// yet synced.
//
// Otheise this function is called periodically in order to relay our unconfirmed txs.
// We do this on a random timer to slightly obfuscate which transactions
// come from our .
//
// TODO Ideally, we'd only resend transactions that we think should have been
// mined in the most recent block. Any transaction that wasn't in the top
// blockweight of transactions in the mempool shouldn't have been mined,
// and so is probably just sitting in the mempool waiting to be confirmed.
// Rebroadcasting does nothing to speed up confirmation and only damages
// privacy.
//
// The orce` option results in all unconfirmed transactions being submitted to
// the mempool. This does not necessarily result in those transactions being relayed,
// that depends on the `relay` option. Periodic rebroadcast uses the pattern
// relay=true force=false, while loading into the mempool
// (on start, or after import) uses relay=false force=true.
void CWalletResubmitWalletTransactions(bool relay, bool force)
{
    // Don't attempt to resubmit if th is configured to not broadcast,
    // even if forcing.
    if (!fBroadcastTransactions) return;
    int submitted_tx_count = 0;
    { // cs_ scope
        LOCK(cs_);
        // First filter for the transactions we want to rebroadcast.
        // We use a set with WalletTxOrderComparator so that rebroadcasting occurs in insertion order
        stdset<CWalletTx*, WalletTxOrderComparator> to_submit;
        for (auto& [txid, wtx]  mapWallet) {