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-03 04:28:48 +0800
commit0b4fe8d1929ad64ed576f7560dde4179d71ecfcb (patch)
tree923d7b795c59ddb0e5d338f2b2e6536e00a58c88 /tests/block_test_util.go
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 '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 d40a3726c..81dd7b1d0 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