Skip to content

Commit

Permalink
Fix Bitcoin minTime check
Browse files Browse the repository at this point in the history
The minTime field in getblocktemplate result means the minimal allowed
nTime value. Hence TIME_TOO_OLD shall only happen when nTime is less
than minTime.
  • Loading branch information
Hanjiang Yu committed Jan 1, 2019
1 parent 9dca8de commit 8ab4877
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bitcoin/StratumServerBitcoin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ int ServerBitcoin::checkShare(const ShareBitcoin &share,
if (exJobPtr->isStale()) {
return StratumStatus::JOB_NOT_FOUND;
}
if (nTime <= sjob->minTime_) {
if (nTime < sjob->minTime_) {
return StratumStatus::TIME_TOO_OLD;
}
if (nTime > sjob->nTime_ + 600) {
Expand Down

0 comments on commit 8ab4877

Please sign in to comment.