From 92ef6b54fe00d6b2e065b9a50884418ecaa76d93 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Wed, 30 Dec 2015 12:43:15 +0000 Subject: wallet: protect against exceptions in the block pull thread This can happen when the daemon exits, which would also cause the wallet to crash via unhandled exception --- src/wallet/wallet2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/wallet/wallet2.h') diff --git a/src/wallet/wallet2.h b/src/wallet/wallet2.h index adb7b13e2..77a9fd18e 100644 --- a/src/wallet/wallet2.h +++ b/src/wallet/wallet2.h @@ -359,7 +359,7 @@ namespace tools bool is_transfer_unlocked(const transfer_details& td) const; bool clear(); void pull_blocks(uint64_t start_height, uint64_t& blocks_start_height, const std::list &short_chain_history, std::list &blocks); - void pull_next_blocks(uint64_t start_height, uint64_t &blocks_start_height, std::list &short_chain_history, const std::list &prev_blocks, std::list &blocks); + void pull_next_blocks(uint64_t start_height, uint64_t &blocks_start_height, std::list &short_chain_history, const std::list &prev_blocks, std::list &blocks, bool &error); void process_blocks(uint64_t start_height, const std::list &blocks, uint64_t& blocks_added); uint64_t select_transfers(uint64_t needed_money, bool add_dust, uint64_t dust, std::list& selected_transfers); bool prepare_file_names(const std::string& file_path); -- cgit v1.2.3 From bc8a52efd8dcda4544856e724a17c9cba161d4a2 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Wed, 30 Dec 2015 12:58:15 +0000 Subject: wallet: add a rescan_bc command and rescan_blockchain RPC Blockchain hashes and key images are flushed, and blocks are pulled anew from the daemon. The console command is shortened to match bc_height. This should make it a lot easier on users who are currently told to remove this particular cache file but keep the keys one, etc, etc. --- src/wallet/wallet2.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/wallet/wallet2.h') diff --git a/src/wallet/wallet2.h b/src/wallet/wallet2.h index 77a9fd18e..88a5268bc 100644 --- a/src/wallet/wallet2.h +++ b/src/wallet/wallet2.h @@ -280,6 +280,7 @@ namespace tools void get_unconfirmed_payments_out(std::list>& unconfirmed_payments) const; uint64_t get_blockchain_current_height() const { return m_local_bc_height; } void rescan_spent(); + void rescan_blockchain(bool refresh = true); template inline void serialize(t_archive &a, const unsigned int ver) { -- cgit v1.2.3