Skip to content

Commit

Permalink
feat: add back timestamp check in worker
Browse files Browse the repository at this point in the history
  • Loading branch information
davidtaikocha committed Nov 6, 2024
1 parent 11e6061 commit 185e4c3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions miner/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,10 @@ func (miner *Miner) prepareWork(genParams *generateParams, witness bool) (*envir
return nil, fmt.Errorf("invalid timestamp, parent %d given %d", parent.Time, timestamp)
}
timestamp = parent.Time + 1
} else {
if parent.Time > timestamp {
return nil, fmt.Errorf("invalid timestamp, parent %d given %d", parent.Time, timestamp)
}
}
}
// Construct the sealing block header.
Expand Down

0 comments on commit 185e4c3

Please sign in to comment.