aboutsummaryrefslogtreecommitdiffstats
path: root/graphql
diff options
context:
space:
mode:
authorMartin Holst Swende <martin@swende.se>2019-04-03 04:28:48 +0800
committerPéter Szilágyi <peterke@gmail.com>2019-04-03 04:28:48 +0800
commit0b4fe8d1929ad64ed576f7560dde4179d71ecfcb (patch)
tree923d7b795c59ddb0e5d338f2b2e6536e00a58c88 /graphql
parente14f8a408c17fd6c57d769cd4635ad6cc8bde769 (diff)
downloadgo-tangerine-0b4fe8d1929ad64ed576f7560dde4179d71ecfcb.tar
go-tangerine-0b4fe8d1929ad64ed576f7560dde4179d71ecfcb.tar.gz
go-tangerine-0b4fe8d1929ad64ed576f7560dde4179d71ecfcb.tar.bz2
go-tangerine-0b4fe8d1929ad64ed576f7560dde4179d71ecfcb.tar.lz
go-tangerine-0b4fe8d1929ad64ed576f7560dde4179d71ecfcb.tar.xz
go-tangerine-0b4fe8d1929ad64ed576f7560dde4179d71ecfcb.tar.zst
go-tangerine-0b4fe8d1929ad64ed576f7560dde4179d71ecfcb.zip
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
Diffstat (limited to 'graphql')
-rw-r--r--graphql/graphql.go6
-rw-r--r--graphql/schema.go2
2 files changed, 4 insertions, 4 deletions
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!