mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-16 18:00:46 +00:00
updated DAO_TEST.GO
This commit is contained in:
parent
bf041d1d7b
commit
19c8fa1aad
1 changed files with 4 additions and 4 deletions
|
|
@ -106,7 +106,7 @@ func testDAOForkBlockNewChain(t *testing.T, test int, genesis string, expectBloc
|
||||||
datadir := tmpdir(t)
|
datadir := tmpdir(t)
|
||||||
defer os.RemoveAll(datadir)
|
defer os.RemoveAll(datadir)
|
||||||
|
|
||||||
// Start a Geth instance with the requested flags set and immediately terminate
|
// Start a XDC instance with the requested flags set and immediately terminate
|
||||||
if genesis != "" {
|
if genesis != "" {
|
||||||
json := filepath.Join(datadir, "genesis.json")
|
json := filepath.Join(datadir, "genesis.json")
|
||||||
if err := ioutil.WriteFile(json, []byte(genesis), 0600); err != nil {
|
if err := ioutil.WriteFile(json, []byte(genesis), 0600); err != nil {
|
||||||
|
|
@ -116,11 +116,11 @@ func testDAOForkBlockNewChain(t *testing.T, test int, genesis string, expectBloc
|
||||||
} else {
|
} else {
|
||||||
// Force chain initialization
|
// Force chain initialization
|
||||||
args := []string{"--port", "0", "--maxpeers", "0", "--nodiscover", "--nat", "none", "--ipcdisable", "--datadir", datadir}
|
args := []string{"--port", "0", "--maxpeers", "0", "--nodiscover", "--nat", "none", "--ipcdisable", "--datadir", datadir}
|
||||||
geth := runGeth(t, append(args, []string{"--exec", "2+2", "console"}...)...)
|
XDC := runGeth(t, append(args, []string{"--exec", "2+2", "console"}...)...)
|
||||||
geth.WaitExit()
|
XDC.WaitExit()
|
||||||
}
|
}
|
||||||
// Retrieve the DAO config flag from the database
|
// Retrieve the DAO config flag from the database
|
||||||
path := filepath.Join(datadir, "geth", "chaindata")
|
path := filepath.Join(datadir, "XDC", "chaindata")
|
||||||
db, err := ethdb.NewLDBDatabase(path, 0, 0)
|
db, err := ethdb.NewLDBDatabase(path, 0, 0)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("test %d: failed to open test database: %v", test, err)
|
t.Fatalf("test %d: failed to open test database: %v", test, err)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue