mirror of
https://github.com/SChernykh/p2pool.git
synced 2024-12-22 19:39:22 +00:00
Fix: set timestamp for locally found blocks
This commit is contained in:
parent
85d2c71047
commit
9ad9821e2a
1 changed files with 4 additions and 0 deletions
|
@ -1290,9 +1290,13 @@ std::vector<uint8_t> BlockTemplate::get_block_template_blob(uint32_t template_id
|
|||
|
||||
bool BlockTemplate::submit_sidechain_block(uint32_t template_id, uint32_t nonce, uint32_t extra_nonce)
|
||||
{
|
||||
const uint64_t received_timestamp = microseconds_since_epoch();
|
||||
|
||||
WriteLock lock(m_lock);
|
||||
|
||||
if (template_id == m_templateId) {
|
||||
m_poolBlockTemplate->m_receivedTimestamp = received_timestamp;
|
||||
|
||||
m_poolBlockTemplate->m_nonce = nonce;
|
||||
m_poolBlockTemplate->m_extraNonce = extra_nonce;
|
||||
m_poolBlockTemplate->m_sidechainId = calc_sidechain_hash(extra_nonce);
|
||||
|
|
Loading…
Reference in a new issue