Skip to content

Commit

Permalink
fix testnet genesis
Browse files Browse the repository at this point in the history
  • Loading branch information
elvis88 committed Feb 20, 2019
1 parent 36bc33c commit 6a73587
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build/testnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"ActivatedMinQuantity": 1000,
"BlockInterval": 3000,
"BlockFrequency": 6,
"ProducerScheduleSize": 21,
"ProducerScheduleSize": 15,
"DelayEcho": 2,
"AccountName": "ftsystemdpos",
"SystemName": "ftsystemio",
Expand Down
2 changes: 1 addition & 1 deletion consensus/miner/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ func (worker *Worker) commitNewWork(timestamp int64) (*types.Block, error) {
return nil, errors.New("mint the future block")
}
// if dpos.IsFirst(uint64(timestamp)) && parent.Time.Int64() != timestamp-int64(dpos.BlockInterval()) && timestamp-time.Now().UnixNano() >= int64(dpos.BlockInterval())/10 {
if dpos.IsFirst(uint64(timestamp)) && parent.Time.Int64() != timestamp-int64(dpos.BlockInterval()) && time.Now().UnixNano()-timestamp <= 2*int64(dpos.BlockInterval())/5 {
if parent.Number.Uint64() > 0 && dpos.IsFirst(uint64(timestamp)) && parent.Time.Int64() != timestamp-int64(dpos.BlockInterval()) && time.Now().UnixNano()-timestamp <= 2*int64(dpos.BlockInterval())/5 {
return nil, errors.New("wait for last block arrived")
}

Expand Down

0 comments on commit 6a73587

Please sign in to comment.