@@ -704,6 +704,20 @@ class CWallet final : public CCryptoKeyStore, private interfaces::Chain::Notific
704704 bool AddWatchOnly (const CScript& dest) override EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
705705 bool AddWatchOnlyWithDB (WalletBatch &batch, const CScript& dest) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
706706
707+ /* * Add a KeyOriginInfo to the wallet */
708+ bool AddKeyOriginWithDB (WalletBatch& batch, const CPubKey& pubkey, const KeyOriginInfo& info);
709+
710+ // ! Adds a key to the store, and saves it to disk.
711+ bool AddKeyPubKeyWithDB (WalletBatch &batch,const CKey& key, const CPubKey &pubkey) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
712+
713+ // ! Adds a watch-only address to the store, and saves it to disk.
714+ bool AddWatchOnlyWithDB (WalletBatch &batch, const CScript& dest, int64_t create_time) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
715+
716+ void AddKeypoolPubkeyWithDB (const CPubKey& pubkey, const bool internal, WalletBatch& batch);
717+
718+ // ! Adds a script to the store and saves it to disk
719+ bool AddCScriptWithDB (WalletBatch& batch, const CScript& script);
720+
707721 /* * Interface for accessing chain state. */
708722 interfaces::Chain* m_chain;
709723
@@ -854,7 +868,6 @@ class CWallet final : public CCryptoKeyStore, private interfaces::Chain::Notific
854868 CPubKey GenerateNewKey (WalletBatch& batch, bool internal = false ) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
855869 // ! Adds a key to the store, and saves it to disk.
856870 bool AddKeyPubKey (const CKey& key, const CPubKey &pubkey) override EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
857- bool AddKeyPubKeyWithDB (WalletBatch &batch,const CKey& key, const CPubKey &pubkey) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
858871 // ! Adds a key to the store, without saving it to disk (used by LoadWallet)
859872 bool LoadKey (const CKey& key, const CPubKey &pubkey) { return CCryptoKeyStore::AddKeyPubKey (key, pubkey); }
860873 // ! Load metadata (used by LoadWallet)
@@ -871,7 +884,6 @@ class CWallet final : public CCryptoKeyStore, private interfaces::Chain::Notific
871884 // ! Adds an encrypted key to the store, without saving it to disk (used by LoadWallet)
872885 bool LoadCryptedKey (const CPubKey &vchPubKey, const std::vector<unsigned char > &vchCryptedSecret);
873886 bool AddCScript (const CScript& redeemScript) override ;
874- bool AddCScriptWithDB (WalletBatch& batch, const CScript& script);
875887 bool LoadCScript (const CScript& redeemScript);
876888
877889 // ! Adds a destination data tuple to the store, and saves it to disk
@@ -887,7 +899,6 @@ class CWallet final : public CCryptoKeyStore, private interfaces::Chain::Notific
887899
888900 // ! Adds a watch-only address to the store, and saves it to disk.
889901 bool AddWatchOnly (const CScript& dest, int64_t nCreateTime) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
890- bool AddWatchOnlyWithDB (WalletBatch &batch, const CScript& dest, int64_t create_time) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
891902 bool RemoveWatchOnly (const CScript &dest) override EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
892903 // ! Adds a watch-only address to the store, without saving it to disk (used by LoadWallet)
893904 bool LoadWatchOnly (const CScript &dest);
@@ -975,6 +986,11 @@ class CWallet final : public CCryptoKeyStore, private interfaces::Chain::Notific
975986 bool DummySignTx (CMutableTransaction &txNew, const std::vector<CTxOut> &txouts, bool use_max_sig = false ) const ;
976987 bool DummySignInput (CTxIn &tx_in, const CTxOut &txout, bool use_max_sig = false ) const ;
977988
989+ bool ImportScripts (const std::set<CScript> scripts) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
990+ bool ImportPrivKeys (const std::map<CKeyID, CKey>& privkey_map, const int64_t timestamp) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
991+ bool ImportPubKeys (const std::vector<CKeyID>& ordered_pubkeys, const std::map<CKeyID, CPubKey>& pubkey_map, const std::map<CKeyID, std::pair<CPubKey, KeyOriginInfo>>& key_origins, const bool add_keypool, const bool internal, const int64_t timestamp) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
992+ bool ImportScriptPubKeys (const std::string& label, const std::set<CScript>& script_pub_keys, const bool have_solving_data, const bool internal, const int64_t timestamp) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
993+
978994 CFeeRate m_pay_tx_fee{DEFAULT_PAY_TX_FEE};
979995 unsigned int m_confirm_target{DEFAULT_TX_CONFIRM_TARGET};
980996 bool m_spend_zero_conf_change{DEFAULT_SPEND_ZEROCONF_CHANGE};
@@ -994,7 +1010,6 @@ class CWallet final : public CCryptoKeyStore, private interfaces::Chain::Notific
9941010 bool NewKeyPool ();
9951011 size_t KeypoolCountExternalKeys () EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
9961012 bool TopUpKeyPool (unsigned int kpSize = 0 );
997- void AddKeypoolPubkeyWithDB (const CPubKey& pubkey, const bool internal, WalletBatch& batch);
9981013
9991014 /* *
10001015 * Reserves a key from the keypool and sets nIndex to its index
@@ -1211,9 +1226,6 @@ class CWallet final : public CCryptoKeyStore, private interfaces::Chain::Notific
12111226
12121227 /* * Implement lookup of key origin information through wallet key metadata. */
12131228 bool GetKeyOrigin (const CKeyID& keyid, KeyOriginInfo& info) const override ;
1214-
1215- /* * Add a KeyOriginInfo to the wallet */
1216- bool AddKeyOriginWithDB (WalletBatch& batch, const CPubKey& pubkey, const KeyOriginInfo& info);
12171229};
12181230
12191231/* *
0 commit comments