diff options
author | Wei-Ning Huang <w@dexon.org> | 2018-11-29 16:49:08 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2018-12-19 20:54:27 +0800 |
commit | 1e3905f62035b91c928667af236e0e6bf866792d (patch) | |
tree | 25735e66a96a5f6605111ed6c3df53b3ca783535 | |
parent | deafadd1ef999004c1ce8a2de8658abc141c53de (diff) | |
download | dexon-1e3905f62035b91c928667af236e0e6bf866792d.tar.gz dexon-1e3905f62035b91c928667af236e0e6bf866792d.tar.zst dexon-1e3905f62035b91c928667af236e0e6bf866792d.zip |
core: fix tests (#65)
-rw-r--r-- | cmd/gdex/dao_test.go | 2 | ||||
-rw-r--r-- | cmd/gdex/genesis_test.go | 14 | ||||
-rw-r--r-- | console/console_test.go | 7 | ||||
-rw-r--r-- | params/config.go | 4 |
4 files changed, 12 insertions, 15 deletions
diff --git a/cmd/gdex/dao_test.go b/cmd/gdex/dao_test.go index c4d3d0cc2..26572762c 100644 --- a/cmd/gdex/dao_test.go +++ b/cmd/gdex/dao_test.go @@ -127,7 +127,7 @@ func testDAOForkBlockNewChain(t *testing.T, test int, genesis string, expectBloc } defer db.Close() - genesisHash := common.HexToHash("0x52b1459248252fcec3e9429362bdbc576c09515cfac0a87b278b2bf98d640c42") + genesisHash := common.HexToHash("0xc8e4d0c33d92b7751fe3747f778aa27600508c8c922be1dbbc7db6ee967f4e6c") if genesis != "" { genesisHash = daoGenesisHash } diff --git a/cmd/gdex/genesis_test.go b/cmd/gdex/genesis_test.go index 38db9e0c4..9187a68bf 100644 --- a/cmd/gdex/genesis_test.go +++ b/cmd/gdex/genesis_test.go @@ -57,10 +57,10 @@ var customGenesisTests = []struct { "parentHash" : "0x0000000000000000000000000000000000000000000000000000000000000000", "timestamp" : "0x00", "config" : { - "dexcon": { - "lambdaBA": 250, - }, - }, + "dexcon": { + "lambdaBA": 250, + }, + }, }`, query: "eth.getBlock(0).nonce", result: "0x0000000000000042", @@ -81,9 +81,9 @@ var customGenesisTests = []struct { "homesteadBlock" : 314, "daoForkBlock" : 141, "daoForkSupport" : true, - "dexcon": { - "lambdaBA": 250, - }, + "dexcon": { + "lambdaBA": 250, + }, }, }`, query: "eth.getBlock(0).nonce", diff --git a/console/console_test.go b/console/console_test.go index ce650b161..0d751a484 100644 --- a/console/console_test.go +++ b/console/console_test.go @@ -156,7 +156,7 @@ func (env *tester) Close(t *testing.T) { } // Tests that the node lists the correct welcome message, notably that it contains -// the instance name, coinbase account, block number, data directory and supported +// the instance name, block number, data directory and supported // console modules. func TestWelcome(t *testing.T) { tester := newTester(t, nil) @@ -171,14 +171,11 @@ func TestWelcome(t *testing.T) { if want := fmt.Sprintf("instance: %s", testInstance); !strings.Contains(output, want) { t.Fatalf("console output missing instance: have\n%s\nwant also %s", output, want) } - if want := fmt.Sprintf("coinbase: %s", testAddress); !strings.Contains(output, want) { - t.Fatalf("console output missing coinbase: have\n%s\nwant also %s", output, want) - } if want := "at block: 0"; !strings.Contains(output, want) { t.Fatalf("console output missing sync status: have\n%s\nwant also %s", output, want) } if want := fmt.Sprintf("datadir: %s", tester.workspace); !strings.Contains(output, want) { - t.Fatalf("console output missing coinbase: have\n%s\nwant also %s", output, want) + t.Fatalf("console output missing datadir: have\n%s\nwant also %s", output, want) } } diff --git a/params/config.go b/params/config.go index fa24d6e17..7bba2c14b 100644 --- a/params/config.go +++ b/params/config.go @@ -26,8 +26,8 @@ import ( // Genesis hashes to enforce below configs on. var ( - MainnetGenesisHash = common.HexToHash("0x52b1459248252fcec3e9429362bdbc576c09515cfac0a87b278b2bf98d640c42") - TestnetGenesisHash = common.HexToHash("0x868521018a07ea7ccd1f0ca4f6e554b832187add550f9b2ac55664bd96ff264d") + MainnetGenesisHash = common.HexToHash("0xc8e4d0c33d92b7751fe3747f778aa27600508c8c922be1dbbc7db6ee967f4e6c") + TestnetGenesisHash = common.HexToHash("0x63b758fa30bf833430171514448288d4e67c1d6a989d1474fdd5c5888dfe77fd") ) var ( |