From 724b94278054ea93b76574a52d0d7cd086cf7db7 Mon Sep 17 00:00:00 2001 From: Guillaume Babin-Tremblay Date: Thu, 8 Aug 2024 04:58:58 -0600 Subject: [PATCH] Obtain reference to fake chain blocks via the list of reversible blocks stored by light client for better encapsulation --- unittests/svnn_finality_violation_tests.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unittests/svnn_finality_violation_tests.cpp b/unittests/svnn_finality_violation_tests.cpp index 965ce4b376..b11ea1e8f5 100644 --- a/unittests/svnn_finality_violation_tests.cpp +++ b/unittests/svnn_finality_violation_tests.cpp @@ -608,8 +608,8 @@ BOOST_AUTO_TEST_SUITE(svnn_finality_violation) mutable_variant_object valid_rule_2_proof_2 = prepare_rule_2_proof( light_client_data.active_finalizer_policy, get_finality_block_data(real_chain_block_14_result), get_finality_block_data(real_chain_block_15_result).qc_data.qc.value(), - get_finality_block_data(fake_chain_block_13_result), - get_finality_block_data(fake_chain_block_14_result).qc_data.qc.value(), + light_client_data.reversible_blocks[light_client_data.reversible_blocks.size()-2], + light_client_data.reversible_blocks[light_client_data.reversible_blocks.size()-1].qc_data.qc.value(), block_ref_digests); BOOST_CHECK(shouldPass(real_chain, "rule2"_n, valid_rule_2_proof_2));