From 0b4fe8d1929ad64ed576f7560dde4179d71ecfcb Mon Sep 17 00:00:00 2001
From: Martin Holst Swende <martin@swende.se>
Date: Tue, 2 Apr 2019 22:28:48 +0200
Subject: all: simplify timestamps to uint64 (#19372)

* all: simplify timestamps to uint64

* tests: update definitions

* clef, faucet, mobile: leftover uint64 fixups

* ethash: fix tests

* graphql: update schema for timestamp

* ethash: remove unused variable
---
 cmd/clef/main.go     | 2 +-
 cmd/faucet/faucet.go | 2 +-
 cmd/geth/main.go     | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

(limited to 'cmd')

diff --git a/cmd/clef/main.go b/cmd/clef/main.go
index a90031245..06c034a55 100644
--- a/cmd/clef/main.go
+++ b/cmd/clef/main.go
@@ -690,7 +690,7 @@ func testExternalUI(api *core.SignerAPI) {
 			big.NewInt(1337),
 			1338,
 			1338,
-			big.NewInt(1338),
+			1338,
 			[]byte("Extra data Extra data Extra data  Extra data  Extra data  Extra data  Extra data Extra data"),
 			common.HexToHash("0x0000H45H"),
 			types.BlockNonce{},
diff --git a/cmd/faucet/faucet.go b/cmd/faucet/faucet.go
index 5e4b77a6a..78b4a6563 100644
--- a/cmd/faucet/faucet.go
+++ b/cmd/faucet/faucet.go
@@ -579,7 +579,7 @@ func (f *faucet) loop() {
 	go func() {
 		for head := range update {
 			// New chain head arrived, query the current stats and stream to clients
-			timestamp := time.Unix(head.Time.Int64(), 0)
+			timestamp := time.Unix(int64(head.Time), 0)
 			if time.Since(timestamp) > time.Hour {
 				log.Warn("Skipping faucet refresh, head too old", "number", head.Number, "hash", head.Hash(), "age", common.PrettyAge(timestamp))
 				continue
diff --git a/cmd/geth/main.go b/cmd/geth/main.go
index 0763a9ed3..3d96de312 100644
--- a/cmd/geth/main.go
+++ b/cmd/geth/main.go
@@ -365,7 +365,7 @@ func startNode(ctx *cli.Context, stack *node.Node) {
 				if !ok {
 					continue
 				}
-				if timestamp := time.Unix(done.Latest.Time.Int64(), 0); time.Since(timestamp) < 10*time.Minute {
+				if timestamp := time.Unix(int64(done.Latest.Time), 0); time.Since(timestamp) < 10*time.Minute {
 					log.Info("Synchronisation completed", "latestnum", done.Latest.Number, "latesthash", done.Latest.Hash(),
 						"age", common.PrettyAge(timestamp))
 					stack.Stop()
-- 
cgit v1.2.3