From 02cd60e85d7641889f51b592bf7f67d0703fa6fb Mon Sep 17 00:00:00 2001 From: sowle Date: Wed, 10 Jun 2020 19:52:39 +0300 Subject: [PATCH] fix alias update signature buffer for upcoming auditable wallets and hf2 --- src/currency_core/currency_format_utils.cpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/currency_core/currency_format_utils.cpp b/src/currency_core/currency_format_utils.cpp index d51b7821..d2e0d2e2 100644 --- a/src/currency_core/currency_format_utils.cpp +++ b/src/currency_core/currency_format_utils.cpp @@ -419,15 +419,10 @@ namespace currency //--------------------------------------------------------------- crypto::hash get_sign_buff_hash_for_alias_update(const extra_alias_entry& ai) { - const extra_alias_entry* pale = &ai; - extra_alias_entry eae_local = AUTO_VAL_INIT(eae_local); - if (ai.m_sign.size()) - { - eae_local = ai; - eae_local.m_sign.clear(); - pale = &eae_local; - } - return get_object_hash(*pale); + extra_alias_entry_old ai_old = ai.to_old(); + if (ai_old.m_sign.size()) + ai_old.m_sign.clear(); + return get_object_hash(ai_old); } //--------------------------------------------------------------- struct tx_extra_handler : public boost::static_visitor