speed up block mining
This commit is contained in:
parent
ae3fcca543
commit
9f9c30d406
@ -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)
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user