Skip to content

Commit

Permalink
Doesn't always increase timestamp for metadium
Browse files Browse the repository at this point in the history
  • Loading branch information
sadoci committed Jan 20, 2020
1 parent 9f660d3 commit 51e8a72
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions miner/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -1183,11 +1183,11 @@ func (w *worker) commitNewWork(interrupt *int32, noempty bool, timestamp int64)
return
}
}
if parent.Time() >= uint64(timestamp) {
timestamp = int64(parent.Time() + 1)
}

if metaminer.IsPoW() {
if parent.Time() >= uint64(timestamp) {
timestamp = int64(parent.Time() + 1)
}
// this will ensure we're not going off too far in the future
if now := time.Now().Unix(); timestamp > now+1 {
wait := time.Duration(timestamp-now) * time.Second
Expand Down

0 comments on commit 51e8a72

Please sign in to comment.