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(NotifyUnload.empty());
    }
    bool IsCrypted() const;
    bool IsLocked() const override;
    bool Lock();
    
    bool HaveChain() const { return m_chain ? true : false; }
    /** Map from txid to CWalletTx for all transactions this wallet is
     * interested in, including received and sent transactions. */
    std::map<uint256, CWalletTx> mapWallet GUARDED_BY(cs_wallet);
    typedef std::multimap<int64_t, CWalletTx*> TxItems;
    TxItems wtxOrdered;
    int64_t nOrderPosNext GUARDED_BY(cs_wallet) = 0;
    uint64_t nAccountingEntryNumber = 0;
    std::map<CTxDestination, CAddressBookData> m_address_book GUARDED_BY(cs_wallet);
    const CAddressBookData* FindAddressBookEntry(const CTxDestination&, bool allow_change = false) const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
    /** Set of Coins owned by this wallet that we won't try to spend from. A
     * Coin may be locked if it has already been used to fund a transaction
     * that hasn't confirmed yet. We wouldn't consider the Coin spent already,
     * but also shouldn't try to use it again. */
    std::set<COutPoint> setLockedCoins GUARDED_BY(cs_wallet);
    
    std::unique_ptr<interfaces::Handler> m_chain_notifications_handler;
    
    interfaces::Chain& chain() const { assert(m_chain); return *m_chain; }