From f1cccbe3e0ca5717313bb1cb6226f2cbcad1fbf1 Mon Sep 17 00:00:00 2001 From: sowle Date: Sun, 18 Feb 2024 23:35:56 +0100 Subject: [PATCH 1/3] (hopefully) a proper fix for the template hell in get_first_service_attachment_by_id --- .../bc_attachments_helpers_basic.h | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/currency_core/bc_attachments_helpers_basic.h b/src/currency_core/bc_attachments_helpers_basic.h index d14e543b..74039e9d 100644 --- a/src/currency_core/bc_attachments_helpers_basic.h +++ b/src/currency_core/bc_attachments_helpers_basic.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2018 Zano Project +// Copyright (c) 2014-2024 Zano Project // Copyright (c) 2014-2018 The Louisdor Project // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. @@ -25,8 +25,8 @@ namespace bc_services { return t.type(); } - template - static const t_return_type& get(const t_type& t, const t_return_type& dummy) + template + static const t_return_type& get(const t_type& t) { return boost::get(t); } @@ -40,8 +40,8 @@ namespace bc_services { return typeid(t); } - template - static const t_return_type& get(const t_type& t, const t_return_type& dummy) + template + static const t_return_type& get(const t_type& t) { return t; } @@ -52,10 +52,10 @@ namespace bc_services { for (const auto& item : tx_items) { - if (/*item.type()*/ type_selector::value>::get_type(item) == typeid(currency::tx_service_attachment)) + typedef type_selector::value> TS; + if (TS::get_type(item) == typeid(currency::tx_service_attachment)) { - const currency::tx_service_attachment& tsa = type_selector::value>::get(item, currency::tx_service_attachment()); - //const currency::tx_service_attachment& tsa = boost::get(item); + const currency::tx_service_attachment& tsa = TS::template get(item); if (tsa.service_id == id && tsa.instruction == instruction) { res = tsa; @@ -65,4 +65,5 @@ namespace bc_services } return false; } -} \ No newline at end of file + +} From c4034402871d3e42a8514304666bfff7da1ac3ee Mon Sep 17 00:00:00 2001 From: sowle Date: Tue, 20 Feb 2024 11:57:01 +0100 Subject: [PATCH 2/3] wallet: WALLET_FILE_SERIALIZATION_VERSION bump up 161 -> 162 --- src/currency_core/currency_config.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/currency_core/currency_config.h b/src/currency_core/currency_config.h index ea58bcad..6b3974d7 100644 --- a/src/currency_core/currency_config.h +++ b/src/currency_core/currency_config.h @@ -250,8 +250,8 @@ #define BC_OFFERS_CURRENCY_MARKET_FILENAME "market.bin" #ifndef TESTNET -#define WALLET_FILE_SERIALIZATION_VERSION 161 -#define WALLET_FILE_LAST_SUPPORTED_VERSION 161 +#define WALLET_FILE_SERIALIZATION_VERSION 162 +#define WALLET_FILE_LAST_SUPPORTED_VERSION 162 #else #define WALLET_FILE_LAST_SUPPORTED_VERSION (CURRENCY_FORMATION_VERSION+76) #define WALLET_FILE_SERIALIZATION_VERSION (CURRENCY_FORMATION_VERSION+76) From e589464fc04a6704dfe1669287f9f977693fc2de Mon Sep 17 00:00:00 2001 From: zano build machine Date: Tue, 20 Feb 2024 13:57:34 +0300 Subject: [PATCH 3/3] === build number: 261 -> 262 === --- src/version.h.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/version.h.in b/src/version.h.in index d63ac38e..318cb4f1 100644 --- a/src/version.h.in +++ b/src/version.h.in @@ -8,6 +8,6 @@ #define PROJECT_REVISION "0" #define PROJECT_VERSION PROJECT_MAJOR_VERSION "." PROJECT_MINOR_VERSION "." PROJECT_REVISION -#define PROJECT_VERSION_BUILD_NO 261 +#define PROJECT_VERSION_BUILD_NO 262 #define PROJECT_VERSION_BUILD_NO_STR STRINGIFY_EXPAND(PROJECT_VERSION_BUILD_NO) #define PROJECT_VERSION_LONG PROJECT_VERSION "." PROJECT_VERSION_BUILD_NO_STR "[" BUILD_COMMIT_ID "]"