speed up block mining

This commit is contained in:
Anton Evangelatov 2020-06-25 12:21:14 +02:00
parent ae3fcca543
commit 9f9c30d406
2 changed files with 3 additions and 6 deletions

View File

@ -82,15 +82,12 @@ func runBaselineMiner(t *TestEnvironment) error {
go func() {
defer close(done)
for mine {
time.Sleep(1000 * time.Millisecond)
t.RecordMessage("mine one block")
time.Sleep(100 * time.Millisecond)
//t.RecordMessage("mine one block")
// wait and synchronise
if err := miner.MineOne(ctx, func(bool) {
// after a block is mined
}); err != nil {
panic(err)
}

View File

@ -134,7 +134,7 @@ func prepareBootstrapper(t *TestEnvironment) (*Node, error) {
genesisTemplate := genesis.Template{
Accounts: genesisActors,
Miners: genesisMiners,
Timestamp: uint64(time.Now().Unix() - 10000), // this needs to be in the past
Timestamp: uint64(time.Now().Unix() - 100000), // this needs to be in the past
}
// dump the genesis block