소스 검색

Fix geth blocktest command

Taylor Gerring 10 년 전
부모
커밋
8507c867b9
2개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 0
      cmd/geth/blocktestcmd.go
  2. 2 2
      tests/block_test_util.go

+ 1 - 0
cmd/geth/blocktestcmd.go

@@ -86,6 +86,7 @@ func runBlockTest(ctx *cli.Context) {
 }
 
 func runOneBlockTest(ctx *cli.Context, test *tests.BlockTest) (*eth.Ethereum, error) {
+	// TODO remove in favor of logic contained in tests package
 	cfg := utils.MakeEthConfig(ClientIdentifier, Version, ctx)
 	cfg.NewDB = func(path string) (common.Database, error) { return ethdb.NewMemDatabase() }
 	cfg.MaxPeers = 0 // disable network

+ 2 - 2
tests/block_test_util.go

@@ -85,7 +85,7 @@ type btTransaction struct {
 }
 
 func RunBlockTest(filepath string) error {
-	bt, err := loadBlockTests(filepath)
+	bt, err := LoadBlockTests(filepath)
 	if err != nil {
 		return err
 	}
@@ -449,7 +449,7 @@ func mustConvertUint(in string, base int) uint64 {
 	return out
 }
 
-func loadBlockTests(file string) (map[string]*BlockTest, error) {
+func LoadBlockTests(file string) (map[string]*BlockTest, error) {
 	bt := make(map[string]*btJSON)
 	if err := readTestFile(file, &bt); err != nil {
 		return nil, err