diff options
Diffstat (limited to '')
-rw-r--r-- | src/wallet/wallet2.h | 47 |
1 files changed, 1 insertions, 46 deletions
diff --git a/src/wallet/wallet2.h b/src/wallet/wallet2.h index d5737a5bd..5e922494b 100644 --- a/src/wallet/wallet2.h +++ b/src/wallet/wallet2.h @@ -70,7 +70,6 @@ #include "common/password.h" #include "node_rpc_proxy.h" #include "message_store.h" -#include "wallet_light_rpc.h" #undef MONERO_DEFAULT_LOG_CATEGORY #define MONERO_DEFAULT_LOG_CATEGORY "wallet.wallet2" @@ -143,11 +142,6 @@ private: virtual void on_money_spent(uint64_t height, const crypto::hash &txid, const cryptonote::transaction& in_tx, uint64_t amount, const cryptonote::transaction& spend_tx, const cryptonote::subaddress_index& subaddr_index) {} virtual void on_skip_transaction(uint64_t height, const crypto::hash &txid, const cryptonote::transaction& tx) {} virtual boost::optional<epee::wipeable_string> on_get_password(const char *reason) { return boost::none; } - // Light wallet callbacks - virtual void on_lw_new_block(uint64_t height) {} - virtual void on_lw_money_received(uint64_t height, const crypto::hash &txid, uint64_t amount) {} - virtual void on_lw_unconfirmed_money_received(uint64_t height, const crypto::hash &txid, uint64_t amount) {} - virtual void on_lw_money_spent(uint64_t height, const crypto::hash &txid, uint64_t amount) {} // Device callbacks virtual void on_device_button_request(uint64_t code) {} virtual void on_device_button_pressed() {} @@ -982,14 +976,6 @@ private: bool get_seed(epee::wipeable_string& electrum_words, const epee::wipeable_string &passphrase = epee::wipeable_string()) const; /*! - * \brief Checks if light wallet. A light wallet sends view key to a server where the blockchain is scanned. - */ - bool light_wallet() const { return m_light_wallet; } - void set_light_wallet(bool light_wallet) { m_light_wallet = light_wallet; } - uint64_t get_light_wallet_scanned_block_height() const { return m_light_wallet_scanned_block_height; } - uint64_t get_light_wallet_blockchain_height() const { return m_light_wallet_blockchain_height; } - - /*! * \brief Gets the seed language */ const std::string &get_seed_language() const; @@ -1104,7 +1090,7 @@ private: void get_unconfirmed_payments_out(std::list<std::pair<crypto::hash,wallet2::unconfirmed_transfer_details>>& unconfirmed_payments, const boost::optional<uint32_t>& subaddr_account = boost::none, const std::set<uint32_t>& subaddr_indices = {}) const; void get_unconfirmed_payments(std::list<std::pair<crypto::hash,wallet2::pool_payment_details>>& unconfirmed_payments, const boost::optional<uint32_t>& subaddr_account = boost::none, const std::set<uint32_t>& subaddr_indices = {}) const; - uint64_t get_blockchain_current_height() const { return m_light_wallet_blockchain_height ? m_light_wallet_blockchain_height : m_blockchain.size(); } + uint64_t get_blockchain_current_height() const { return m_blockchain.size(); } void rescan_spent(); void rescan_blockchain(bool hard, bool refresh = true, bool keep_key_images = false); bool is_transfer_unlocked(const transfer_details& td); @@ -1537,23 +1523,6 @@ private: std::pair<size_t, uint64_t> estimate_tx_size_and_weight(bool use_rct, int n_inputs, int ring_size, int n_outputs, size_t extra_size); - // Light wallet specific functions - // fetch unspent outs from lw node and store in m_transfers - void light_wallet_get_unspent_outs(); - // fetch txs and store in m_payments - void light_wallet_get_address_txs(); - // get_address_info - bool light_wallet_get_address_info(tools::COMMAND_RPC_GET_ADDRESS_INFO::response &response); - // Login. new_address is true if address hasn't been used on lw node before. - bool light_wallet_login(bool &new_address); - // Send an import request to lw node. returns info about import fee, address and payment_id - bool light_wallet_import_wallet_request(tools::COMMAND_RPC_IMPORT_WALLET_REQUEST::response &response); - // get random outputs from light wallet server - void light_wallet_get_outs(std::vector<std::vector<get_outs_entry>> &outs, const std::vector<size_t> &selected_transfers, size_t fake_outputs_count); - // Parse rct string - bool light_wallet_parse_rct_str(const std::string& rct_string, const crypto::public_key& tx_pub_key, uint64_t internal_output_index, rct::key& decrypted_mask, rct::key& rct_commit, bool decrypt) const; - // check if key image is ours - bool light_wallet_key_image_is_ours(const crypto::key_image& key_image, const crypto::public_key& tx_public_key, uint64_t out_index); /* * "attributes" are a mechanism to store an arbitrary number of string values @@ -1861,20 +1830,6 @@ private: // Aux transaction data from device serializable_unordered_map<crypto::hash, std::string> m_tx_device; - // Light wallet - bool m_light_wallet; /* sends view key to daemon for scanning */ - uint64_t m_light_wallet_scanned_block_height; - uint64_t m_light_wallet_blockchain_height; - uint64_t m_light_wallet_per_kb_fee = FEE_PER_KB; - bool m_light_wallet_connected; - uint64_t m_light_wallet_balance; - uint64_t m_light_wallet_unlocked_balance; - // Light wallet info needed to populate m_payment requires 2 separate api calls (get_address_txs and get_unspent_outs) - // We save the info from the first call in m_light_wallet_address_txs for easier lookup. - std::unordered_map<crypto::hash, address_tx> m_light_wallet_address_txs; - // store calculated key image for faster lookup - serializable_unordered_map<crypto::public_key, serializable_map<uint64_t, crypto::key_image> > m_key_image_cache; - std::string m_ring_database; bool m_ring_history_saved; std::unique_ptr<ringdb> m_ringdb; |