From c99c23b9dadd2070e23dd93d92295f19d0f46495 Mon Sep 17 00:00:00 2001 From: sowle Date: Wed, 17 Jan 2024 00:39:35 +0100 Subject: [PATCH] wallet2: set decoys count for PoS mining tx according to the core runtime config --- src/wallet/wallet2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 1c3f77ab..51fae358 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -4278,7 +4278,7 @@ bool wallet2::prepare_and_sign_pos_block(const mining_context& cxt, uint64_t ful uint64_t secret_index = 0; // index of the real stake output // get decoys outputs and construct miner tx - static size_t required_decoys_count = 4; // TODO @#@# set them somewhere else + const size_t required_decoys_count = m_core_runtime_config.hf4_minimum_mixins == 0 ? 4 /* <-- for tests */ : m_core_runtime_config.hf4_minimum_mixins; static bool use_only_forced_to_mix = false; // TODO @#@# set them somewhere else if (required_decoys_count > 0 && !is_auditable()) {