@@ -704,6 +704,20 @@ class CWallet final : public CCryptoKeyStore, private interfaces::Chain::Notific
704
704
bool AddWatchOnly (const CScript& dest) override EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
705
705
bool AddWatchOnlyWithDB (WalletBatch &batch, const CScript& dest) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
706
706
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
+
707
721
/* * Interface for accessing chain state. */
708
722
interfaces::Chain* m_chain;
709
723
@@ -854,7 +868,6 @@ class CWallet final : public CCryptoKeyStore, private interfaces::Chain::Notific
854
868
CPubKey GenerateNewKey (WalletBatch& batch, bool internal = false ) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
855
869
// ! Adds a key to the store, and saves it to disk.
856
870
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);
858
871
// ! Adds a key to the store, without saving it to disk (used by LoadWallet)
859
872
bool LoadKey (const CKey& key, const CPubKey &pubkey) { return CCryptoKeyStore::AddKeyPubKey (key, pubkey); }
860
873
// ! Load metadata (used by LoadWallet)
@@ -871,7 +884,6 @@ class CWallet final : public CCryptoKeyStore, private interfaces::Chain::Notific
871
884
// ! Adds an encrypted key to the store, without saving it to disk (used by LoadWallet)
872
885
bool LoadCryptedKey (const CPubKey &vchPubKey, const std::vector<unsigned char > &vchCryptedSecret);
873
886
bool AddCScript (const CScript& redeemScript) override ;
874
- bool AddCScriptWithDB (WalletBatch& batch, const CScript& script);
875
887
bool LoadCScript (const CScript& redeemScript);
876
888
877
889
// ! 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
887
899
888
900
// ! Adds a watch-only address to the store, and saves it to disk.
889
901
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);
891
902
bool RemoveWatchOnly (const CScript &dest) override EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
892
903
// ! Adds a watch-only address to the store, without saving it to disk (used by LoadWallet)
893
904
bool LoadWatchOnly (const CScript &dest);
@@ -975,6 +986,11 @@ class CWallet final : public CCryptoKeyStore, private interfaces::Chain::Notific
975
986
bool DummySignTx (CMutableTransaction &txNew, const std::vector<CTxOut> &txouts, bool use_max_sig = false ) const ;
976
987
bool DummySignInput (CTxIn &tx_in, const CTxOut &txout, bool use_max_sig = false ) const ;
977
988
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
+
978
994
CFeeRate m_pay_tx_fee{DEFAULT_PAY_TX_FEE};
979
995
unsigned int m_confirm_target{DEFAULT_TX_CONFIRM_TARGET};
980
996
bool m_spend_zero_conf_change{DEFAULT_SPEND_ZEROCONF_CHANGE};
@@ -994,7 +1010,6 @@ class CWallet final : public CCryptoKeyStore, private interfaces::Chain::Notific
994
1010
bool NewKeyPool ();
995
1011
size_t KeypoolCountExternalKeys () EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
996
1012
bool TopUpKeyPool (unsigned int kpSize = 0 );
997
- void AddKeypoolPubkeyWithDB (const CPubKey& pubkey, const bool internal, WalletBatch& batch);
998
1013
999
1014
/* *
1000
1015
* 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
1211
1226
1212
1227
/* * Implement lookup of key origin information through wallet key metadata. */
1213
1228
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);
1217
1229
};
1218
1230
1219
1231
/* *
0 commit comments