From 642cc94691cdff5b5dd76c3a99dbd77b31eb5235 Mon Sep 17 00:00:00 2001 From: sowle Date: Wed, 12 Oct 2022 17:54:42 +0200 Subject: [PATCH] wallet2::is_in_hardfork_zone() made const --- src/wallet/wallet2.cpp | 5 ++--- src/wallet/wallet2.h | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index f3e51e5b..7174368f 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -3589,10 +3589,9 @@ bool wallet2::get_pos_entries(std::vector& entries) return true; } //---------------------------------------------------------------------------------------------------- -bool wallet2::is_in_hardfork_zone(uint64_t hardfork_index) +bool wallet2::is_in_hardfork_zone(uint64_t hardfork_index) const { - const currency::core_runtime_config& rtc = get_core_runtime_config(); - return rtc.is_hardfork_active_for_height(hardfork_index, get_blockchain_current_size()); + return m_core_runtime_config.is_hardfork_active_for_height(hardfork_index, get_blockchain_current_size()); } //---------------------------------------------------------------------------------------------------- bool wallet2::prepare_and_sign_pos_block(currency::block& b, diff --git a/src/wallet/wallet2.h b/src/wallet/wallet2.h index 9298ece2..63758b85 100644 --- a/src/wallet/wallet2.h +++ b/src/wallet/wallet2.h @@ -1043,7 +1043,7 @@ private: uint64_t get_directly_spent_transfer_index_by_input_in_tracking_wallet(uint64_t amount, const std::vector & key_offsets); uint64_t get_directly_spent_transfer_index_by_input_in_tracking_wallet(const currency::txin_to_key& intk); uint64_t get_directly_spent_transfer_index_by_input_in_tracking_wallet(const currency::txin_zc_input& inzc); - bool is_in_hardfork_zone(uint64_t hardfork_index); + bool is_in_hardfork_zone(uint64_t hardfork_index) const; uint8_t out_get_mixin_attr(const currency::tx_out_v& out_t); const crypto::public_key& out_get_pub_key(const currency::tx_out_v& out_t, std::list& htlc_info_list);