fix failures preventing running tests

This commit is contained in:
Jared Wasinger 2026-01-13 18:00:14 +09:00
parent 1c712daa14
commit f40f5d5d54
2 changed files with 7 additions and 1 deletions

View file

@ -20,6 +20,7 @@ import (
"bufio" "bufio"
"encoding/json" "encoding/json"
"fmt" "fmt"
"github.com/ethereum/go-ethereum/cmd/utils"
"maps" "maps"
"os" "os"
"regexp" "regexp"
@ -117,7 +118,7 @@ func runBlockTest(ctx *cli.Context, fname string) ([]testResult, error) {
test := tests[name] test := tests[name]
result := &testResult{Name: name, Pass: true} result := &testResult{Name: name, Pass: true}
var finalRoot *common.Hash var finalRoot *common.Hash
if err := test.Run(false, rawdb.PathScheme, ctx.Bool(WitnessCrossCheckFlag.Name), tracer, func(res error, chain *core.BlockChain) { if err := test.Run(false, rawdb.PathScheme, ctx.Bool(WitnessCrossCheckFlag.Name), ctx.Bool(utils.ExperimentalBALFlag.Name), tracer, func(res error, chain *core.BlockChain) {
if ctx.Bool(DumpFlag.Name) { if ctx.Bool(DumpFlag.Name) {
if s, _ := chain.State(); s != nil { if s, _ := chain.State(); s != nil {
result.State = dump(s) result.State = dump(s)

View file

@ -259,6 +259,11 @@ func (t *BlockTest) Run(snapshotter bool, scheme string, witness bool, createAnd
return nil return nil
} }
// 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,