P2PServer: log time it took to relay a block

This commit is contained in:
SChernykh
2023-03-21 10:58:32 +01:00
parent d41a441e98
commit b6c1b1a6d7
5 changed files with 32 additions and 12 deletions

View File

@@ -53,6 +53,7 @@ PoolBlock::PoolBlock()
, m_wantBroadcast(false)
, m_precalculated(false)
, m_localTimestamp(seconds_since_epoch())
, m_receivedTimestamp(0)
{
}
@@ -102,6 +103,7 @@ PoolBlock& PoolBlock::operator=(const PoolBlock& b)
m_precalculated = b.m_precalculated;
m_localTimestamp = seconds_since_epoch();
m_receivedTimestamp = b.m_receivedTimestamp;
return *this;
}
@@ -266,6 +268,7 @@ void PoolBlock::reset_offchain_data()
m_precalculated = false;
m_localTimestamp = seconds_since_epoch();
m_receivedTimestamp = 0;
}
bool PoolBlock::get_pow_hash(RandomX_Hasher_Base* hasher, uint64_t height, const hash& seed_hash, hash& pow_hash)