Skip to content

Commit

Permalink
Fixed time bias bug
Browse files Browse the repository at this point in the history
Time bias (difference between local and server time) was calculated
incorrectly.
localTime + timeBias should equal serverTime (roughly)
  • Loading branch information
jh000 committed Feb 1, 2014
1 parent 732812d commit c3a1117
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xptMiner/xptClientPacketHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ bool xptClient_processPacket_blockData1(xptClient_t* xptClient)
// The first hash in xptClient->blockWorkInfo.txHashes is reserved for the coinbase transaction
}
xptClient->blockWorkInfo.timeWork = time(NULL);
xptClient->blockWorkInfo.timeBias = (uint32)time(NULL) - xptClient->blockWorkInfo.nTime;
xptClient->blockWorkInfo.timeBias = xptClient->blockWorkInfo.nTime - (uint32)time(NULL);
xptClient->hasWorkData = true;
// add general block info (primecoin new pow for xpt v4, removed in xpt v5)
//EnterCriticalSection(&xptClient->cs_workAccess);
Expand Down

0 comments on commit c3a1117

Please sign in to comment.