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
This commit is contained in:
Martin Holst Swende
2019-04-02 22:28:48 +02:00
committed by Péter Szilágyi
parent e14f8a408c
commit 0b4fe8d192
27 changed files with 85 additions and 89 deletions

View File

@ -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{},

View File

@ -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

View File

@ -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()