Skip to content

Commit 0b4fe8d

Browse files
holimankaralabe
authored andcommitted
all: simplify timestamps to uint64 (ethereum#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
1 parent e14f8a4 commit 0b4fe8d

27 files changed

+85
-89
lines changed

cmd/clef/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -690,7 +690,7 @@ func testExternalUI(api *core.SignerAPI) {
690690
big.NewInt(1337),
691691
1338,
692692
1338,
693-
big.NewInt(1338),
693+
1338,
694694
[]byte("Extra data Extra data Extra data Extra data Extra data Extra data Extra data Extra data"),
695695
common.HexToHash("0x0000H45H"),
696696
types.BlockNonce{},

cmd/faucet/faucet.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ func (f *faucet) loop() {
579579
go func() {
580580
for head := range update {
581581
// New chain head arrived, query the current stats and stream to clients
582-
timestamp := time.Unix(head.Time.Int64(), 0)
582+
timestamp := time.Unix(int64(head.Time), 0)
583583
if time.Since(timestamp) > time.Hour {
584584
log.Warn("Skipping faucet refresh, head too old", "number", head.Number, "hash", head.Hash(), "age", common.PrettyAge(timestamp))
585585
continue

cmd/geth/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ func startNode(ctx *cli.Context, stack *node.Node) {
365365
if !ok {
366366
continue
367367
}
368-
if timestamp := time.Unix(done.Latest.Time.Int64(), 0); time.Since(timestamp) < 10*time.Minute {
368+
if timestamp := time.Unix(int64(done.Latest.Time), 0); time.Since(timestamp) < 10*time.Minute {
369369
log.Info("Synchronisation completed", "latestnum", done.Latest.Number, "latesthash", done.Latest.Hash(),
370370
"age", common.PrettyAge(timestamp))
371371
stack.Stop()

consensus/clique/clique.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ func (c *Clique) verifyHeader(chain consensus.ChainReader, header *types.Header,
249249
number := header.Number.Uint64()
250250

251251
// Don't waste time checking blocks from the future
252-
if header.Time.Cmp(big.NewInt(time.Now().Unix())) > 0 {
252+
if header.Time > uint64(time.Now().Unix()) {
253253
return consensus.ErrFutureBlock
254254
}
255255
// Checkpoint blocks need to enforce zero beneficiary
@@ -321,7 +321,7 @@ func (c *Clique) verifyCascadingFields(chain consensus.ChainReader, header *type
321321
if parent == nil || parent.Number.Uint64() != number-1 || parent.Hash() != header.ParentHash {
322322
return consensus.ErrUnknownAncestor
323323
}
324-
if parent.Time.Uint64()+c.config.Period > header.Time.Uint64() {
324+
if parent.Time+c.config.Period > header.Time {
325325
return ErrInvalidTimestamp
326326
}
327327
// Retrieve the snapshot needed to verify this header and cache it
@@ -540,9 +540,9 @@ func (c *Clique) Prepare(chain consensus.ChainReader, header *types.Header) erro
540540
if parent == nil {
541541
return consensus.ErrUnknownAncestor
542542
}
543-
header.Time = new(big.Int).Add(parent.Time, new(big.Int).SetUint64(c.config.Period))
544-
if header.Time.Int64() < time.Now().Unix() {
545-
header.Time = big.NewInt(time.Now().Unix())
543+
header.Time = parent.Time + c.config.Period
544+
if header.Time < uint64(time.Now().Unix()) {
545+
header.Time = uint64(time.Now().Unix())
546546
}
547547
return nil
548548
}
@@ -607,7 +607,7 @@ func (c *Clique) Seal(chain consensus.ChainReader, block *types.Block, results c
607607
}
608608
}
609609
// Sweet, the protocol permits us to sign the block, wait for our time
610-
delay := time.Unix(header.Time.Int64(), 0).Sub(time.Now()) // nolint: gosimple
610+
delay := time.Unix(int64(header.Time), 0).Sub(time.Now()) // nolint: gosimple
611611
if header.Difficulty.Cmp(diffNoTurn) == 0 {
612612
// It's not our turn explicitly to sign, delay it a bit
613613
wiggle := time.Duration(len(snap.Signers)/2+1) * wiggleTime

consensus/ethash/algorithm_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -716,7 +716,7 @@ func TestConcurrentDiskCacheGeneration(t *testing.T) {
716716
Difficulty: big.NewInt(167925187834220),
717717
GasLimit: 4015682,
718718
GasUsed: 0,
719-
Time: big.NewInt(1488928920),
719+
Time: 1488928920,
720720
Extra: []byte("www.bw.com"),
721721
MixDigest: common.HexToHash("0x3e140b0784516af5e5ec6730f2fb20cca22f32be399b9e4ad77d32541f798cd0"),
722722
Nonce: types.EncodeNonce(0xf400cd0006070c49),

consensus/ethash/consensus.go

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ var (
6363
// codebase, inherently breaking if the engine is swapped out. Please put common
6464
// error types into the consensus package.
6565
var (
66-
errLargeBlockTime = errors.New("timestamp too big")
6766
errZeroBlockTime = errors.New("timestamp equals parent's")
6867
errTooManyUncles = errors.New("too many uncles")
6968
errDuplicateUncle = errors.New("duplicate uncle")
@@ -242,20 +241,16 @@ func (ethash *Ethash) verifyHeader(chain consensus.ChainReader, header, parent *
242241
return fmt.Errorf("extra-data too long: %d > %d", len(header.Extra), params.MaximumExtraDataSize)
243242
}
244243
// Verify the header's timestamp
245-
if uncle {
246-
if header.Time.Cmp(math.MaxBig256) > 0 {
247-
return errLargeBlockTime
248-
}
249-
} else {
250-
if header.Time.Cmp(big.NewInt(time.Now().Add(allowedFutureBlockTime).Unix())) > 0 {
244+
if !uncle {
245+
if header.Time > uint64(time.Now().Add(allowedFutureBlockTime).Unix()) {
251246
return consensus.ErrFutureBlock
252247
}
253248
}
254-
if header.Time.Cmp(parent.Time) <= 0 {
249+
if header.Time <= parent.Time {
255250
return errZeroBlockTime
256251
}
257252
// Verify the block's difficulty based in it's timestamp and parent's difficulty
258-
expected := ethash.CalcDifficulty(chain, header.Time.Uint64(), parent)
253+
expected := ethash.CalcDifficulty(chain, header.Time, parent)
259254

260255
if expected.Cmp(header.Difficulty) != 0 {
261256
return fmt.Errorf("invalid difficulty: have %v, want %v", header.Difficulty, expected)
@@ -349,7 +344,7 @@ func makeDifficultyCalculator(bombDelay *big.Int) func(time uint64, parent *type
349344
// ) + 2^(periodCount - 2)
350345

351346
bigTime := new(big.Int).SetUint64(time)
352-
bigParentTime := new(big.Int).Set(parent.Time)
347+
bigParentTime := new(big.Int).SetUint64(parent.Time)
353348

354349
// holds intermediate values to make the algo easier to read & audit
355350
x := new(big.Int)
@@ -408,7 +403,7 @@ func calcDifficultyHomestead(time uint64, parent *types.Header) *big.Int {
408403
// ) + 2^(periodCount - 2)
409404

410405
bigTime := new(big.Int).SetUint64(time)
411-
bigParentTime := new(big.Int).Set(parent.Time)
406+
bigParentTime := new(big.Int).SetUint64(parent.Time)
412407

413408
// holds intermediate values to make the algo easier to read & audit
414409
x := new(big.Int)
@@ -456,7 +451,7 @@ func calcDifficultyFrontier(time uint64, parent *types.Header) *big.Int {
456451
bigParentTime := new(big.Int)
457452

458453
bigTime.SetUint64(time)
459-
bigParentTime.Set(parent.Time)
454+
bigParentTime.SetUint64(parent.Time)
460455

461456
if bigTime.Sub(bigTime, bigParentTime).Cmp(params.DurationLimit) < 0 {
462457
diff.Add(parent.Difficulty, adjust)
@@ -558,7 +553,7 @@ func (ethash *Ethash) Prepare(chain consensus.ChainReader, header *types.Header)
558553
if parent == nil {
559554
return consensus.ErrUnknownAncestor
560555
}
561-
header.Difficulty = ethash.CalcDifficulty(chain, header.Time.Uint64(), parent)
556+
header.Difficulty = ethash.CalcDifficulty(chain, header.Time, parent)
562557
return nil
563558
}
564559

consensus/ethash/consensus_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ func TestCalcDifficulty(t *testing.T) {
7676
number := new(big.Int).Sub(test.CurrentBlocknumber, big.NewInt(1))
7777
diff := CalcDifficulty(config, test.CurrentTimestamp, &types.Header{
7878
Number: number,
79-
Time: new(big.Int).SetUint64(test.ParentTimestamp),
79+
Time: test.ParentTimestamp,
8080
Difficulty: test.ParentDifficulty,
8181
})
8282
if diff.Cmp(test.CurrentDifficulty) != 0 {

core/blockchain.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -288,9 +288,9 @@ func (bc *BlockChain) loadLastState() error {
288288
blockTd := bc.GetTd(currentBlock.Hash(), currentBlock.NumberU64())
289289
fastTd := bc.GetTd(currentFastBlock.Hash(), currentFastBlock.NumberU64())
290290

291-
log.Info("Loaded most recent local header", "number", currentHeader.Number, "hash", currentHeader.Hash(), "td", headerTd, "age", common.PrettyAge(time.Unix(currentHeader.Time.Int64(), 0)))
292-
log.Info("Loaded most recent local full block", "number", currentBlock.Number(), "hash", currentBlock.Hash(), "td", blockTd, "age", common.PrettyAge(time.Unix(currentBlock.Time().Int64(), 0)))
293-
log.Info("Loaded most recent local fast block", "number", currentFastBlock.Number(), "hash", currentFastBlock.Hash(), "td", fastTd, "age", common.PrettyAge(time.Unix(currentFastBlock.Time().Int64(), 0)))
291+
log.Info("Loaded most recent local header", "number", currentHeader.Number, "hash", currentHeader.Hash(), "td", headerTd, "age", common.PrettyAge(time.Unix(int64(currentHeader.Time), 0)))
292+
log.Info("Loaded most recent local full block", "number", currentBlock.Number(), "hash", currentBlock.Hash(), "td", blockTd, "age", common.PrettyAge(time.Unix(int64(currentBlock.Time()), 0)))
293+
log.Info("Loaded most recent local fast block", "number", currentFastBlock.Number(), "hash", currentFastBlock.Hash(), "td", fastTd, "age", common.PrettyAge(time.Unix(int64(currentFastBlock.Time()), 0)))
294294

295295
return nil
296296
}
@@ -904,7 +904,7 @@ func (bc *BlockChain) InsertReceiptChain(blockChain types.Blocks, receiptChain [
904904

905905
context := []interface{}{
906906
"count", stats.processed, "elapsed", common.PrettyDuration(time.Since(start)),
907-
"number", head.Number(), "hash", head.Hash(), "age", common.PrettyAge(time.Unix(head.Time().Int64(), 0)),
907+
"number", head.Number(), "hash", head.Hash(), "age", common.PrettyAge(time.Unix(int64(head.Time()), 0)),
908908
"size", common.StorageSize(bytes),
909909
}
910910
if stats.ignored > 0 {
@@ -1074,8 +1074,8 @@ func (bc *BlockChain) writeBlockWithState(block *types.Block, receipts []*types.
10741074
// accepted for future processing, and returns an error if the block is too far
10751075
// ahead and was not added.
10761076
func (bc *BlockChain) addFutureBlock(block *types.Block) error {
1077-
max := big.NewInt(time.Now().Unix() + maxTimeFutureBlocks)
1078-
if block.Time().Cmp(max) > 0 {
1077+
max := uint64(time.Now().Unix() + maxTimeFutureBlocks)
1078+
if block.Time() > max {
10791079
return fmt.Errorf("future block timestamp %v > allowed %v", block.Time(), max)
10801080
}
10811081
bc.futureBlocks.Add(block.Hash(), block)

core/blockchain_insert.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ func (st *insertStats) report(chain []*types.Block, index int, dirty common.Stor
6060
"elapsed", common.PrettyDuration(elapsed), "mgasps", float64(st.usedGas) * 1000 / float64(elapsed),
6161
"number", end.Number(), "hash", end.Hash(),
6262
}
63-
if timestamp := time.Unix(end.Time().Int64(), 0); time.Since(timestamp) > time.Minute {
63+
if timestamp := time.Unix(int64(end.Time()), 0); time.Since(timestamp) > time.Minute {
6464
context = append(context, []interface{}{"age", common.PrettyAge(timestamp)}...)
6565
}
6666
context = append(context, []interface{}{"dirty", dirty}...)

core/chain_makers.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -149,12 +149,12 @@ func (b *BlockGen) PrevBlock(index int) *types.Block {
149149
// associated difficulty. It's useful to test scenarios where forking is not
150150
// tied to chain length directly.
151151
func (b *BlockGen) OffsetTime(seconds int64) {
152-
b.header.Time.Add(b.header.Time, big.NewInt(seconds))
153-
if b.header.Time.Cmp(b.parent.Header().Time) <= 0 {
152+
b.header.Time += uint64(seconds)
153+
if b.header.Time <= b.parent.Header().Time {
154154
panic("block time out of range")
155155
}
156156
chainreader := &fakeChainReader{config: b.config}
157-
b.header.Difficulty = b.engine.CalcDifficulty(chainreader, b.header.Time.Uint64(), b.parent.Header())
157+
b.header.Difficulty = b.engine.CalcDifficulty(chainreader, b.header.Time, b.parent.Header())
158158
}
159159

160160
// GenerateChain creates a chain of n blocks. The first block's
@@ -225,20 +225,20 @@ func GenerateChain(config *params.ChainConfig, parent *types.Block, engine conse
225225
}
226226

227227
func makeHeader(chain consensus.ChainReader, parent *types.Block, state *state.StateDB, engine consensus.Engine) *types.Header {
228-
var time *big.Int
229-
if parent.Time() == nil {
230-
time = big.NewInt(10)
228+
var time uint64
229+
if parent.Time() == 0 {
230+
time = 10
231231
} else {
232-
time = new(big.Int).Add(parent.Time(), big.NewInt(10)) // block time is fixed at 10 seconds
232+
time = parent.Time() + 10 // block time is fixed at 10 seconds
233233
}
234234

235235
return &types.Header{
236236
Root: state.IntermediateRoot(chain.Config().IsEIP158(parent.Number())),
237237
ParentHash: parent.Hash(),
238238
Coinbase: parent.Coinbase(),
239-
Difficulty: engine.CalcDifficulty(chain, time.Uint64(), &types.Header{
239+
Difficulty: engine.CalcDifficulty(chain, time, &types.Header{
240240
Number: parent.Number(),
241-
Time: new(big.Int).Sub(time, big.NewInt(10)),
241+
Time: time - 10,
242242
Difficulty: parent.Difficulty(),
243243
UncleHash: parent.UncleHash(),
244244
}),

core/evm.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ func NewEVMContext(msg Message, header *types.Header, chain ChainContext, author
5151
Origin: msg.From(),
5252
Coinbase: beneficiary,
5353
BlockNumber: new(big.Int).Set(header.Number),
54-
Time: new(big.Int).Set(header.Time),
54+
Time: new(big.Int).SetUint64(header.Time),
5555
Difficulty: new(big.Int).Set(header.Difficulty),
5656
GasLimit: header.GasLimit,
5757
GasPrice: new(big.Int).Set(msg.GasPrice()),

core/genesis.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ func (g *Genesis) ToBlock(db ethdb.Database) *types.Block {
243243
head := &types.Header{
244244
Number: new(big.Int).SetUint64(g.Number),
245245
Nonce: types.EncodeNonce(g.Nonce),
246-
Time: new(big.Int).SetUint64(g.Timestamp),
246+
Time: g.Timestamp,
247247
ParentHash: g.ParentHash,
248248
Extra: g.ExtraData,
249249
GasLimit: g.GasLimit,

core/headerchain.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ func (hc *HeaderChain) InsertHeaderChain(chain []*types.Header, writeHeader WhCa
290290
"count", stats.processed, "elapsed", common.PrettyDuration(time.Since(start)),
291291
"number", last.Number, "hash", last.Hash(),
292292
}
293-
if timestamp := time.Unix(last.Time.Int64(), 0); time.Since(timestamp) > time.Minute {
293+
if timestamp := time.Unix(int64(last.Time), 0); time.Since(timestamp) > time.Minute {
294294
context = append(context, []interface{}{"age", common.PrettyAge(timestamp)}...)
295295
}
296296
if stats.ignored > 0 {

core/types/block.go

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ type Header struct {
7979
Number *big.Int `json:"number" gencodec:"required"`
8080
GasLimit uint64 `json:"gasLimit" gencodec:"required"`
8181
GasUsed uint64 `json:"gasUsed" gencodec:"required"`
82-
Time *big.Int `json:"timestamp" gencodec:"required"`
82+
Time uint64 `json:"timestamp" gencodec:"required"`
8383
Extra []byte `json:"extraData" gencodec:"required"`
8484
MixDigest common.Hash `json:"mixHash"`
8585
Nonce BlockNonce `json:"nonce"`
@@ -91,7 +91,7 @@ type headerMarshaling struct {
9191
Number *hexutil.Big
9292
GasLimit hexutil.Uint64
9393
GasUsed hexutil.Uint64
94-
Time *hexutil.Big
94+
Time hexutil.Uint64
9595
Extra hexutil.Bytes
9696
Hash common.Hash `json:"hash"` // adds call to Hash() in MarshalJSON
9797
}
@@ -107,7 +107,7 @@ var headerSize = common.StorageSize(reflect.TypeOf(Header{}).Size())
107107
// Size returns the approximate memory used by all internal contents. It is used
108108
// to approximate and limit the memory consumption of various caches.
109109
func (h *Header) Size() common.StorageSize {
110-
return headerSize + common.StorageSize(len(h.Extra)+(h.Difficulty.BitLen()+h.Number.BitLen()+h.Time.BitLen())/8)
110+
return headerSize + common.StorageSize(len(h.Extra)+(h.Difficulty.BitLen()+h.Number.BitLen())/8)
111111
}
112112

113113
func rlpHash(x interface{}) (h common.Hash) {
@@ -223,9 +223,6 @@ func NewBlockWithHeader(header *Header) *Block {
223223
// modifying a header variable.
224224
func CopyHeader(h *Header) *Header {
225225
cpy := *h
226-
if cpy.Time = new(big.Int); h.Time != nil {
227-
cpy.Time.Set(h.Time)
228-
}
229226
if cpy.Difficulty = new(big.Int); h.Difficulty != nil {
230227
cpy.Difficulty.Set(h.Difficulty)
231228
}
@@ -288,7 +285,7 @@ func (b *Block) Number() *big.Int { return new(big.Int).Set(b.header.Number)
288285
func (b *Block) GasLimit() uint64 { return b.header.GasLimit }
289286
func (b *Block) GasUsed() uint64 { return b.header.GasUsed }
290287
func (b *Block) Difficulty() *big.Int { return new(big.Int).Set(b.header.Difficulty) }
291-
func (b *Block) Time() *big.Int { return new(big.Int).Set(b.header.Time) }
288+
func (b *Block) Time() uint64 { return b.header.Time }
292289

293290
func (b *Block) NumberU64() uint64 { return b.header.Number.Uint64() }
294291
func (b *Block) MixDigest() common.Hash { return b.header.MixDigest }

core/types/block_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func TestBlockEncoding(t *testing.T) {
4848
check("Root", block.Root(), common.HexToHash("ef1552a40b7165c3cd773806b9e0c165b75356e0314bf0706f279c729f51e017"))
4949
check("Hash", block.Hash(), common.HexToHash("0a5843ac1cb04865017cb35a57b50b07084e5fcee39b5acadade33149f4fff9e"))
5050
check("Nonce", block.Nonce(), uint64(0xa13a5a8c8f2bb1c4))
51-
check("Time", block.Time(), big.NewInt(1426516743))
51+
check("Time", block.Time(), uint64(1426516743))
5252
check("Size", block.Size(), common.StorageSize(len(blockEnc)))
5353

5454
tx1 := NewTransaction(0, common.HexToAddress("095e7baea6a6c7c4c2dfeb977efac326af552d87"), big.NewInt(10), 50000, big.NewInt(10), nil)

core/types/gen_header_json.go

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ethstats/ethstats.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ func (s *Service) assembleBlockStats(block *types.Block) *blockStats {
557557
Number: header.Number,
558558
Hash: header.Hash(),
559559
ParentHash: header.ParentHash,
560-
Timestamp: header.Time,
560+
Timestamp: new(big.Int).SetUint64(header.Time),
561561
Miner: author,
562562
GasUsed: header.GasUsed,
563563
GasLimit: header.GasLimit,

graphql/graphql.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -512,12 +512,12 @@ func (b *Block) Difficulty(ctx context.Context) (hexutil.Big, error) {
512512
return hexutil.Big(*header.Difficulty), nil
513513
}
514514

515-
func (b *Block) Timestamp(ctx context.Context) (hexutil.Big, error) {
515+
func (b *Block) Timestamp(ctx context.Context) (hexutil.Uint64, error) {
516516
header, err := b.resolveHeader(ctx)
517517
if err != nil {
518-
return hexutil.Big{}, err
518+
return 0, err
519519
}
520-
return hexutil.Big(*header.Time), nil
520+
return hexutil.Uint64(header.Time), nil
521521
}
522522

523523
func (b *Block) Nonce(ctx context.Context) (hexutil.Bytes, error) {

graphql/schema.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ const schema string = `
165165
# GasUsed is the amount of gas that was used executing transactions in this block.
166166
gasUsed: Long!
167167
# Timestamp is the unix timestamp at which this block was mined.
168-
timestamp: BigInt!
168+
timestamp: Long!
169169
# LogsBloom is a bloom filter that can be used to check if a block may
170170
# contain log entries matching a filter.
171171
logsBloom: Bytes!

internal/ethapi/api.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -883,7 +883,7 @@ func RPCMarshalBlock(b *types.Block, inclTx bool, fullTx bool) (map[string]inter
883883
"size": hexutil.Uint64(b.Size()),
884884
"gasLimit": hexutil.Uint64(head.GasLimit),
885885
"gasUsed": hexutil.Uint64(head.GasUsed),
886-
"timestamp": (*hexutil.Big)(head.Time),
886+
"timestamp": hexutil.Uint64(head.Time),
887887
"transactionsRoot": head.TxHash,
888888
"receiptsRoot": head.ReceiptHash,
889889
}

0 commit comments

Comments
 (0)