internal/ethapi: change Time field to uint64 #26474 (#1585)

This commit is contained in:
Daniel Liu 2025-10-08 12:33:13 +08:00 committed by GitHub
parent 42da35b86c
commit 28c75fc213
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -585,7 +585,7 @@ func (diff *StateOverride) Apply(statedb *state.StateDB) error {
type BlockOverrides struct {
Number *hexutil.Big
Difficulty *hexutil.Big
Time *hexutil.Big
Time *hexutil.Uint64
GasLimit *hexutil.Uint64
Coinbase *common.Address
Random *common.Hash
@ -604,7 +604,7 @@ func (diff *BlockOverrides) Apply(blockCtx *vm.BlockContext) {
blockCtx.Difficulty = diff.Difficulty.ToInt()
}
if diff.Time != nil {
blockCtx.Time = diff.Time.ToInt().Uint64()
blockCtx.Time = uint64(*diff.Time)
}
if diff.GasLimit != nil {
blockCtx.GasLimit = uint64(*diff.GasLimit)