aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorWei-Ning Huang <w@dexon.org>2019-03-17 10:43:10 +0800
committerWei-Ning Huang <w@byzantine-lab.io>2019-06-12 17:27:23 +0800
commit5f64e1d10d620a8a299ff3a40695f26107f157c5 (patch)
treee28e2bf073ac7da8417e5b0789d2d0713e240ae7 /cmd
parent9493109f2be4507605e6b17e406bf8fd147ab3c8 (diff)
downloadgo-tangerine-5f64e1d10d620a8a299ff3a40695f26107f157c5.tar
go-tangerine-5f64e1d10d620a8a299ff3a40695f26107f157c5.tar.gz
go-tangerine-5f64e1d10d620a8a299ff3a40695f26107f157c5.tar.bz2
go-tangerine-5f64e1d10d620a8a299ff3a40695f26107f157c5.tar.lz
go-tangerine-5f64e1d10d620a8a299ff3a40695f26107f157c5.tar.xz
go-tangerine-5f64e1d10d620a8a299ff3a40695f26107f157c5.tar.zst
go-tangerine-5f64e1d10d620a8a299ff3a40695f26107f157c5.zip
core: fill in genesis timstamp and remove dMoment from protocol handshake (#263)
Fill in dmoment as genesis block timestamp. This allow us to remove dMoment check from protocol handshake since genesis block hash itself will protect us against different dMoment.
Diffstat (limited to 'cmd')
-rw-r--r--cmd/gdex/consolecmd_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/gdex/consolecmd_test.go b/cmd/gdex/consolecmd_test.go
index 672735d2c..c1174f9e6 100644
--- a/cmd/gdex/consolecmd_test.go
+++ b/cmd/gdex/consolecmd_test.go
@@ -51,7 +51,7 @@ func TestConsoleWelcome(t *testing.T) {
gdex.SetTemplateFunc("goarch", func() string { return runtime.GOARCH })
gdex.SetTemplateFunc("gover", runtime.Version)
gdex.SetTemplateFunc("gethver", func() string { return params.VersionWithMeta })
- gdex.SetTemplateFunc("dextime", func() string { return time.Unix(1540024964, 0).Format(time.RFC1123) })
+ gdex.SetTemplateFunc("dextime", func() string { return time.Unix(int64(params.MainnetChainConfig.DMoment), 0).Format(time.RFC1123) })
gdex.SetTemplateFunc("apis", func() string { return ipcAPIs })
// Verify the actual welcome message to the required template
@@ -134,7 +134,7 @@ func testAttachWelcome(t *testing.T, gdex *testgdex, endpoint, apis string) {
attach.SetTemplateFunc("gover", runtime.Version)
attach.SetTemplateFunc("gethver", func() string { return params.VersionWithMeta })
attach.SetTemplateFunc("etherbase", func() string { return gdex.Etherbase })
- attach.SetTemplateFunc("dextime", func() string { return time.Unix(1540024964, 0).Format(time.RFC1123) })
+ attach.SetTemplateFunc("dextime", func() string { return time.Unix(int64(params.MainnetChainConfig.DMoment), 0).Format(time.RFC1123) })
attach.SetTemplateFunc("ipc", func() bool { return strings.HasPrefix(endpoint, "ipc") })
attach.SetTemplateFunc("datadir", func() string { return gdex.Datadir })
attach.SetTemplateFunc("apis", func() string { return apis })