fix block insertion in main.go

pull/4465/head
“GheisMohammadi” 1 year ago
parent 352212744d
commit 591f223e84
No known key found for this signature in database
GPG Key ID: 15073AED3829FE90
  1. 6
      test/chain/main.go

@ -134,7 +134,7 @@ func fundFaucetContract(chain core.BlockChain) {
}()
block, _ := contractworker.
FinalizeNewBlock(commitSigs, func() uint64 { return 0 }, common.Address{}, nil, nil)
_, err = chain.InsertChain(types.Blocks{block}, true /* verifyHeaders */)
_, err = chain.InsertChain(types.Blocks{block}, true /* verifyHeaders */, true)
if err != nil {
fmt.Println(err)
}
@ -184,7 +184,7 @@ func callFaucetContractToFundAnAddress(chain core.BlockChain) {
block, _ := contractworker.FinalizeNewBlock(
commitSigs, func() uint64 { return 0 }, common.Address{}, nil, nil,
)
_, err = chain.InsertChain(types.Blocks{block}, true /* verifyHeaders */)
_, err = chain.InsertChain(types.Blocks{block}, true /* verifyHeaders */, true)
if err != nil {
fmt.Println(err)
}
@ -227,7 +227,7 @@ func main() {
gen.SetShardID(0)
gen.AddTx(pendingTxs[i].(*types.Transaction))
})
if _, err := chain.InsertChain(blocks, true /* verifyHeaders */); err != nil {
if _, err := chain.InsertChain(blocks, true /* verifyHeaders */, true); err != nil {
log.Fatal(err)
}
}

Loading…
Cancel
Save