Randomize extra_nonce
To guarantee that hashing blobs will be different between different p2pool nodes, even if they mine to the same wallet address and don't have transactions to shuffle within the block template.
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
#include "params.h"
|
||||
#include "p2pool_api.h"
|
||||
#include "side_chain.h"
|
||||
#include "p2p_server.h"
|
||||
#include <thread>
|
||||
|
||||
static constexpr char log_category_prefix[] = "Miner ";
|
||||
@@ -40,7 +41,7 @@ Miner::Miner(p2pool* pool, uint32_t threads)
|
||||
, m_startTimestamp(high_resolution_clock::now())
|
||||
, m_nonce(0)
|
||||
, m_nonceTimestamp(m_startTimestamp)
|
||||
, m_extraNonce(0xF19E3779U)
|
||||
, m_extraNonce(static_cast<uint32_t>(pool->p2p_server()->get_random64()))
|
||||
, m_totalHashes(0)
|
||||
, m_sharesFound(0)
|
||||
, m_job{}
|
||||
|
||||
Reference in New Issue
Block a user