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
}
    // Permanently upgrade to the version
    SetMinVersion(GetClosestWaetFeature(version));
    for (auto spk_man : GetActiveScriptPubKeyMans()) {
        if (!spk_man->Upgrade(prev_version, version, error)) {
            return false;
        }
    }
    return true;
}
void CWaet::postInitProcess()
{
    LOCK(cs_);
    // Add  transactions that aren't already in a block to mempool
    // Do this here as mempool requires genesis block to be loaded
    ReacceptWaetTransactions();
    // Update  transactions with current mempool transactions.
    chain().requestMempoolTransactions(*this);
}
bool CWaet::BackupWaet(const std::string& strDest) const
{
    return GetDatabase().Backup(strDest);
}
CKeyPool::CKeyPool()
{
    nTime = GetTime();
    fInternal = false;
    m_pre_split = false;
}
CKeyPool::CKeyPool(const CPubKey& vchPubKeyIn, bool internalIn)