aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet_errors.h
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-04-28 12:11:42 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-07-16 23:13:56 +0100
commitd6440ab319ea6adf21485550d6a08ae452d49818 (patch)
tree3829a4d28fc531c672c23337be702172c7d7f9a7 /src/wallet/wallet_errors.h
parentMerge pull request #4117 (diff)
downloadmonero-d6440ab319ea6adf21485550d6a08ae452d49818.tar.xz
wallet2: recover from index out of hashchain bounds error
This can happen when there's a very large reorg on the daemon (ie, on testnet)
Diffstat (limited to '')
-rw-r--r--src/wallet/wallet_errors.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/wallet/wallet_errors.h b/src/wallet/wallet_errors.h
index 214d51cde..e80652750 100644
--- a/src/wallet/wallet_errors.h
+++ b/src/wallet/wallet_errors.h
@@ -70,6 +70,7 @@ namespace tools
// get_out_indexes_error
// tx_parse_error
// get_tx_pool_error
+ // out_of_hashchain_bounds_error
// transfer_error *
// get_random_outs_general_error
// not_enough_unlocked_money
@@ -398,6 +399,16 @@ namespace tools
std::string to_string() const { return refresh_error::to_string(); }
};
//----------------------------------------------------------------------------------------------------
+ struct out_of_hashchain_bounds_error : public refresh_error
+ {
+ explicit out_of_hashchain_bounds_error(std::string&& loc)
+ : refresh_error(std::move(loc), "Index out of bounds of of hashchain")
+ {
+ }
+
+ std::string to_string() const { return refresh_error::to_string(); }
+ };
+ //----------------------------------------------------------------------------------------------------
struct transfer_error : public wallet_logic_error
{
protected: