From 7cc220c8bd0af94e7320b6df236753e5bd0fbdb8 Mon Sep 17 00:00:00 2001 From: sowle Date: Fri, 8 Jan 2021 02:22:29 +0300 Subject: [PATCH] coretests: count_ref_by_id_and_gindex_refs_for_tx_inputs added --- tests/core_tests/chaingen.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tests/core_tests/chaingen.h b/tests/core_tests/chaingen.h index daf36a83..44a64a75 100644 --- a/tests/core_tests/chaingen.h +++ b/tests/core_tests/chaingen.h @@ -916,6 +916,26 @@ inline uint64_t get_sources_total_amount(const std::vector(in); + for (auto& ko : in2key.key_offsets) + { + if (ko.type() == typeid(currency::ref_by_id)) + ++refs_by_id; + else if (ko.type() == typeid(uint64_t)) + ++refs_by_gindex; + } + } +} + template void append_vector_by_another_vector(U& dst, const V& src) {