aboutsummaryrefslogtreecommitdiffstats
path: root/tests/block_test_util.go
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-08 17:00:42 +0800
commitaf401d03a395c21fdb297edb687edf8af3470cb2 (patch)
treed2ee3476c9005ffe1aca7abbe7152765da0efe32 /tests/block_test_util.go
parent80a2a35bc3aaf208b5f91a1fb1d803975d4bb01c (diff)
downloadgo-tangerine-af401d03a395c21fdb297edb687edf8af3470cb2.tar
go-tangerine-af401d03a395c21fdb297edb687edf8af3470cb2.tar.gz
go-tangerine-af401d03a395c21fdb297edb687edf8af3470cb2.tar.bz2
go-tangerine-af401d03a395c21fdb297edb687edf8af3470cb2.tar.lz
go-tangerine-af401d03a395c21fdb297edb687edf8af3470cb2.tar.xz
go-tangerine-af401d03a395c21fdb297edb687edf8af3470cb2.tar.zst
go-tangerine-af401d03a395c21fdb297edb687edf8af3470cb2.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 'tests/block_test_util.go')
-rw-r--r--tests/block_test_util.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/block_test_util.go b/tests/block_test_util.go
index 9fa69bf4e..3a1644497 100644
--- a/tests/block_test_util.go
+++ b/tests/block_test_util.go
@@ -82,7 +82,7 @@ type btHeader struct {
Difficulty *big.Int
GasLimit uint64
GasUsed uint64
- Timestamp *big.Int
+ Timestamp uint64
}
type btHeaderMarshaling struct {
@@ -91,7 +91,7 @@ type btHeaderMarshaling struct {
Difficulty *math.HexOrDecimal256
GasLimit math.HexOrDecimal64
GasUsed math.HexOrDecimal64
- Timestamp *math.HexOrDecimal256
+ Timestamp math.HexOrDecimal64
}
func (t *BlockTest) Run() error {
@@ -146,7 +146,7 @@ func (t *BlockTest) genesis(config *params.ChainConfig) *core.Genesis {
return &core.Genesis{
Config: config,
Nonce: t.json.Genesis.Nonce.Uint64(),
- Timestamp: t.json.Genesis.Timestamp.Uint64(),
+ Timestamp: t.json.Genesis.Timestamp,
ParentHash: t.json.Genesis.ParentHash,
ExtraData: t.json.Genesis.ExtraData,
GasLimit: t.json.Genesis.GasLimit,
@@ -248,7 +248,7 @@ func validateHeader(h *btHeader, h2 *types.Header) error {
if h.GasUsed != h2.GasUsed {
return fmt.Errorf("GasUsed: want: %d have: %d", h.GasUsed, h2.GasUsed)
}
- if h.Timestamp.Cmp(h2.Time) != 0 {
+ if h.Timestamp != h2.Time {
return fmt.Errorf("Timestamp: want: %v have: %v", h.Timestamp, h2.Time)
}
return nil