mirror of
https://github.com/SChernykh/p2pool.git
synced 2025-01-09 12:19:26 +00:00
Enable 4-byte target format for diff up to 4 million
This commit is contained in:
parent
519b4b548d
commit
541b3c653d
1 changed files with 4 additions and 4 deletions
|
@ -198,8 +198,8 @@ bool StratumServer::on_login(StratumClient* client, uint32_t id, const char* log
|
|||
|
||||
log::hex_buf target_hex(reinterpret_cast<const uint8_t*>(&target), sizeof(uint64_t));
|
||||
|
||||
// Use short target format (4 bytes) for diff <= ~2 million
|
||||
if ((target >> 32) >= 2147) {
|
||||
// Use short target format (4 bytes) for diff <= ~4 million
|
||||
if ((target >> 32) >= 1073) {
|
||||
target_hex.m_data += sizeof(uint32_t);
|
||||
target_hex.m_size -= sizeof(uint32_t);
|
||||
}
|
||||
|
@ -392,8 +392,8 @@ void StratumServer::on_blobs_ready()
|
|||
{
|
||||
log::hex_buf target_hex(reinterpret_cast<const uint8_t*>(&target), sizeof(uint64_t));
|
||||
|
||||
// Use short target format (4 bytes) for diff <= ~2 million
|
||||
if ((target >> 32) >= 2147) {
|
||||
// Use short target format (4 bytes) for diff <= ~4 million
|
||||
if ((target >> 32) >= 1073) {
|
||||
target_hex.m_data += sizeof(uint32_t);
|
||||
target_hex.m_size -= sizeof(uint32_t);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue