From 0b4fe8d1929ad64ed576f7560dde4179d71ecfcb Mon Sep 17 00:00:00 2001 From: Martin Holst Swende 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 --- graphql/graphql.go | 6 +++--- graphql/schema.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'graphql') diff --git a/graphql/graphql.go b/graphql/graphql.go index b16f93e46..b3bcbd8a4 100644 --- a/graphql/graphql.go +++ b/graphql/graphql.go @@ -512,12 +512,12 @@ func (b *Block) Difficulty(ctx context.Context) (hexutil.Big, error) { return hexutil.Big(*header.Difficulty), nil } -func (b *Block) Timestamp(ctx context.Context) (hexutil.Big, error) { +func (b *Block) Timestamp(ctx context.Context) (hexutil.Uint64, error) { header, err := b.resolveHeader(ctx) if err != nil { - return hexutil.Big{}, err + return 0, err } - return hexutil.Big(*header.Time), nil + return hexutil.Uint64(header.Time), nil } func (b *Block) Nonce(ctx context.Context) (hexutil.Bytes, error) { diff --git a/graphql/schema.go b/graphql/schema.go index e266e429e..bd913d9aa 100644 --- a/graphql/schema.go +++ b/graphql/schema.go @@ -165,7 +165,7 @@ const schema string = ` # GasUsed is the amount of gas that was used executing transactions in this block. gasUsed: Long! # Timestamp is the unix timestamp at which this block was mined. - timestamp: BigInt! + timestamp: Long! # LogsBloom is a bloom filter that can be used to check if a block may # contain log entries matching a filter. logsBloom: Bytes! -- cgit v1.2.3