From 01a458b5bcf2a9a9b8878f49024225a4cb3df42f Mon Sep 17 00:00:00 2001 From: sowle Date: Sun, 2 Oct 2022 00:39:01 +0200 Subject: [PATCH] purge_altblock_keyimages_from_big_heap() adapted for ZC inputs --- src/currency_core/blockchain_storage.cpp | 2 +- src/currency_core/currency_format_utils_abstract.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/currency_core/blockchain_storage.cpp b/src/currency_core/blockchain_storage.cpp index 67e0168a..3640c11e 100644 --- a/src/currency_core/blockchain_storage.cpp +++ b/src/currency_core/blockchain_storage.cpp @@ -1642,7 +1642,7 @@ bool blockchain_storage::purge_altblock_keyimages_from_big_heap(const block& b, { if (tx.vin[n].type() == typeid(txin_to_key) || tx.vin[n].type() == typeid(txin_htlc)) { - purge_keyimage_from_big_heap(get_to_key_input_from_txin_v(tx.vin[n]).k_image, block_id); + purge_keyimage_from_big_heap(get_key_image_txin_v(tx.vin[n]), block_id); } else if (tx.vin[n].type() == typeid(txin_zc_input)) { diff --git a/src/currency_core/currency_format_utils_abstract.h b/src/currency_core/currency_format_utils_abstract.h index addfd80a..1c9f0fff 100644 --- a/src/currency_core/currency_format_utils_abstract.h +++ b/src/currency_core/currency_format_utils_abstract.h @@ -168,7 +168,7 @@ namespace currency } //--------------------------------------------------------------- inline - const crypto::key_image & get_key_image_txin_v(const txin_v& in_v) + const crypto::key_image & get_key_image_txin_v(const txin_v& in_v) { if (in_v.type() == typeid(txin_to_key)) { @@ -184,10 +184,10 @@ namespace currency } else { - ASSERT_MES_AND_THROW("[get_to_key_input_from_txin_v] Wrong type " << in_v.type().name()); + ASSERT_MES_AND_THROW("[get_key_image_txin_v] Wrong type: " << in_v.type().name()); } } - + //--------------------------------------------------------------- //, txin_htlc, txin_zc_input inline bool compare_variant_by_types(const txin_multisig& left, const txin_multisig& right) {