Fix strict time progression in miner

This commit is contained in:
Ignotus Peverell 2018-03-28 07:20:29 +01:00
parent 083d4564c3
commit bfb3505183
No known key found for this signature in database
GPG key ID: 99CD25F39F8F8211

View file

@ -602,8 +602,8 @@ impl Miner {
// prepare the block header timestamp
let mut now_sec = time::get_time().sec;
let head_sec = head.timestamp.to_timespec().sec;
if now_sec == head_sec {
now_sec += 1;
if now_sec <= head_sec {
now_sec = head_sec + 1;
}
// get the difficulty our block should be at