speed up block mining
This commit is contained in:
parent
ae3fcca543
commit
9f9c30d406
@ -82,15 +82,12 @@ func runBaselineMiner(t *TestEnvironment) error {
|
|||||||
go func() {
|
go func() {
|
||||||
defer close(done)
|
defer close(done)
|
||||||
for mine {
|
for mine {
|
||||||
time.Sleep(1000 * time.Millisecond)
|
time.Sleep(100 * time.Millisecond)
|
||||||
t.RecordMessage("mine one block")
|
//t.RecordMessage("mine one block")
|
||||||
|
|
||||||
// wait and synchronise
|
// wait and synchronise
|
||||||
|
|
||||||
if err := miner.MineOne(ctx, func(bool) {
|
if err := miner.MineOne(ctx, func(bool) {
|
||||||
|
|
||||||
// after a block is mined
|
// after a block is mined
|
||||||
|
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
@ -134,7 +134,7 @@ func prepareBootstrapper(t *TestEnvironment) (*Node, error) {
|
|||||||
genesisTemplate := genesis.Template{
|
genesisTemplate := genesis.Template{
|
||||||
Accounts: genesisActors,
|
Accounts: genesisActors,
|
||||||
Miners: genesisMiners,
|
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
|
// dump the genesis block
|
||||||
|
Loading…
Reference in New Issue
Block a user