From 7aaee46d4a2fd29d5f79df1e2d4e6eb0d63c6a3d Mon Sep 17 00:00:00 2001 From: sowle Date: Wed, 17 Jan 2024 13:04:26 +0100 Subject: [PATCH] fixed a HF4-specific bug in is_pos_coinbase() and is_coinbase() --- src/currency_core/currency_format_utils.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/currency_core/currency_format_utils.cpp b/src/currency_core/currency_format_utils.cpp index b4895f8a..59fa77ae 100644 --- a/src/currency_core/currency_format_utils.cpp +++ b/src/currency_core/currency_format_utils.cpp @@ -4041,11 +4041,7 @@ namespace currency //----------------------------------------------------------------------- bool is_pos_coinbase(const transaction& tx) { - bool pos = false; - if (!is_coinbase(tx, pos) || !pos) - return false; - - return true; + return is_pos_miner_tx(tx); } //----------------------------------------------------------------------- bool is_coinbase(const transaction& tx, bool& pos_coinbase) @@ -4053,7 +4049,7 @@ namespace currency if (!is_coinbase(tx)) return false; - pos_coinbase = (tx.vin.size() == 2 && tx.vin[1].type() == typeid(txin_to_key)); + pos_coinbase = is_pos_coinbase(tx); return true; } //-----------------------------------------------------------------------