diff --git a/src/chain.nim b/src/chain.nim index 7826ce781..1056aad6b 100644 --- a/src/chain.nim +++ b/src/chain.nim @@ -31,7 +31,7 @@ type nonce*: string mixHash*: string extraData*: string - timestamp*: EthTime + timestamp*: int stateRoot*: string FundedAddress* = ref object diff --git a/src/constants.nim b/src/constants.nim index 73a81f723..73c2892b2 100644 --- a/src/constants.nim +++ b/src/constants.nim @@ -1,12 +1,11 @@ import - ttmath, math, strutils, tables, utils/padding, rlp, times + ttmath, math, strutils, tables, utils/padding, rlp # rlpFields UInt256, table type TypeHint* {.pure.} = enum UInt256, Bytes, Any - EthTime* = Time #Bytes* = seq[byte] diff --git a/src/utils/header.nim b/src/utils/header.nim index 7e68f01ad..bd9f56425 100644 --- a/src/utils/header.nim +++ b/src/utils/header.nim @@ -1,6 +1,7 @@ import ../constants, ttmath, strformat, times, ../validation type + EthTime = Time Header* = ref object timestamp*: EthTime difficulty*: UInt256 diff --git a/src/vm_state.nim b/src/vm_state.nim index 8c7521279..0a6d4f137 100644 --- a/src/vm_state.nim +++ b/src/vm_state.nim @@ -44,7 +44,7 @@ method blockhash*(vmState: BaseVMState): string = method coinbase*(vmState: BaseVMState): string = vmState.blockHeader.coinbase -method timestamp*(vmState: BaseVMState): EthTime = +method timestamp*(vmState: BaseVMState): int = vmState.blockHeader.timestamp method blockNumber*(vmState: BaseVMState): UInt256 =