mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-16 04:56:36 +00:00
tests: integrate BlockTest.run into BlockTest.Run (#33383)
This commit is contained in:
parent
9a346873b8
commit
c21fe5475f
1 changed files with 5 additions and 8 deletions
|
|
@ -116,15 +116,7 @@ func (t *BlockTest) Run(snapshotter bool, scheme string, witness bool, tracer *t
|
||||||
if !ok {
|
if !ok {
|
||||||
return UnsupportedForkError{t.json.Network}
|
return UnsupportedForkError{t.json.Network}
|
||||||
}
|
}
|
||||||
return t.run(config, snapshotter, scheme, witness, tracer, postCheck)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Network returns the network/fork name for this test.
|
|
||||||
func (t *BlockTest) Network() string {
|
|
||||||
return t.json.Network
|
|
||||||
}
|
|
||||||
|
|
||||||
func (t *BlockTest) run(config *params.ChainConfig, snapshotter bool, scheme string, witness bool, tracer *tracing.Hooks, postCheck func(error, *core.BlockChain)) (result error) {
|
|
||||||
// import pre accounts & construct test genesis block & state root
|
// import pre accounts & construct test genesis block & state root
|
||||||
// Commit genesis state
|
// Commit genesis state
|
||||||
var (
|
var (
|
||||||
|
|
@ -212,6 +204,11 @@ func (t *BlockTest) run(config *params.ChainConfig, snapshotter bool, scheme str
|
||||||
return t.validateImportedHeaders(chain, validBlocks)
|
return t.validateImportedHeaders(chain, validBlocks)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Network returns the network/fork name for this test.
|
||||||
|
func (t *BlockTest) Network() string {
|
||||||
|
return t.json.Network
|
||||||
|
}
|
||||||
|
|
||||||
func (t *BlockTest) genesis(config *params.ChainConfig) *core.Genesis {
|
func (t *BlockTest) genesis(config *params.ChainConfig) *core.Genesis {
|
||||||
return &core.Genesis{
|
return &core.Genesis{
|
||||||
Config: config,
|
Config: config,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue