This would allow wallet operations like funding transactions with smart contract-based inputs such as LN, or any input the Core wallet doesn't know how to sign for.

https://github.com/bitcoin/bitcoin/pull/17211#issuecomment-933674310
assert(false);
        }
        delete encrypted_batch;
        encrypted_batch = nuptr;
        Lock();
        Unlock(strWaetPassphrase);
        // I
        if (IsWaetFlagSet(WALLET_FLAG_DESCRIPTORS) && !IsWaetFlagSet(WALLET_FLAG_BLANK_WALLET)) {
            SetupDescriptorScriptPubKeyMans();
        } else if (auto spk_man = GetLegacyScriptPubKeyMan()) {
            // i
            if (spk_man->IsHDEnabled()) {
                if (!spk_man->SetupGeneration(true)) {
                    return false;
                }
            }
        }
        Lock();
        // N
        // b
        GetDatabase().Rewrite();
        // B
        // s
        // u
        GetDatabase().ReloadDbEnv();
    }
    NotifyStatusChanged(this);
    return true;
}
DBErrors CWaet::ReorderTransactions()