From f270b979c8861350818bb7f9f4af9795150aff22 Mon Sep 17 00:00:00 2001 From: SChernykh <15806605+SChernykh@users.noreply.github.com> Date: Thu, 9 May 2024 20:47:26 +0200 Subject: [PATCH] Fix: use correct nonce value --- src/merge_mining_client_tari.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/merge_mining_client_tari.cpp b/src/merge_mining_client_tari.cpp index 9e4dffc..ccfd0d1 100644 --- a/src/merge_mining_client_tari.cpp +++ b/src/merge_mining_client_tari.cpp @@ -125,7 +125,7 @@ bool MergeMiningClientTari::get_params(ChainParameters& out_params) const return true; } -void MergeMiningClientTari::submit_solution(const uint8_t (&hashing_blob)[128], size_t nonce_offset, const hash& seed_hash, const std::vector& /*blob*/, const std::vector& /*merkle_proof*/) +void MergeMiningClientTari::submit_solution(const uint8_t (&hashing_blob)[128], size_t nonce_offset, const hash& seed_hash, const std::vector& blob, const std::vector& /*merkle_proof*/) { Block block; { @@ -140,14 +140,14 @@ void MergeMiningClientTari::submit_solution(const uint8_t (&hashing_blob)[128], std::string data; // Monero header + nonce - data.append(reinterpret_cast(hashing_blob), nonce_offset + sizeof(uint32_t)); + data.append(reinterpret_cast(blob.data()), nonce_offset + sizeof(uint32_t)); // Monero seed data.append(1, HASH_SIZE); data.append(reinterpret_cast(seed_hash.h), HASH_SIZE); uint64_t transaction_count; - if (!readVarint(hashing_blob + nonce_offset + sizeof(uint32_t) + HASH_SIZE, hashing_blob + 128, transaction_count)) { + if (!readVarint(hashing_blob + nonce_offset + sizeof(uint32_t) + HASH_SIZE, hashing_blob + sizeof(hashing_blob), transaction_count)) { return; }