Moved EthTime to constants, update more timestamps to EthTime
This commit is contained in:
parent
284a026e51
commit
a731f59bd3
|
@ -31,7 +31,7 @@ type
|
||||||
nonce*: string
|
nonce*: string
|
||||||
mixHash*: string
|
mixHash*: string
|
||||||
extraData*: string
|
extraData*: string
|
||||||
timestamp*: int
|
timestamp*: EthTime
|
||||||
stateRoot*: string
|
stateRoot*: string
|
||||||
|
|
||||||
FundedAddress* = ref object
|
FundedAddress* = ref object
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
|
|
||||||
import
|
import
|
||||||
ttmath, math, strutils, tables, utils/padding, rlp
|
ttmath, math, strutils, tables, utils/padding, rlp, times
|
||||||
|
|
||||||
# rlpFields UInt256, table
|
# rlpFields UInt256, table
|
||||||
|
|
||||||
type
|
type
|
||||||
TypeHint* {.pure.} = enum UInt256, Bytes, Any
|
TypeHint* {.pure.} = enum UInt256, Bytes, Any
|
||||||
|
EthTime* = Time
|
||||||
|
|
||||||
#Bytes* = seq[byte]
|
#Bytes* = seq[byte]
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
import ../constants, ttmath, strformat, times, ../validation
|
import ../constants, ttmath, strformat, times, ../validation
|
||||||
|
|
||||||
type
|
type
|
||||||
EthTime = Time
|
|
||||||
Header* = ref object
|
Header* = ref object
|
||||||
timestamp*: EthTime
|
timestamp*: EthTime
|
||||||
difficulty*: UInt256
|
difficulty*: UInt256
|
||||||
|
|
|
@ -44,7 +44,7 @@ method blockhash*(vmState: BaseVMState): string =
|
||||||
method coinbase*(vmState: BaseVMState): string =
|
method coinbase*(vmState: BaseVMState): string =
|
||||||
vmState.blockHeader.coinbase
|
vmState.blockHeader.coinbase
|
||||||
|
|
||||||
method timestamp*(vmState: BaseVMState): int =
|
method timestamp*(vmState: BaseVMState): EthTime =
|
||||||
vmState.blockHeader.timestamp
|
vmState.blockHeader.timestamp
|
||||||
|
|
||||||
method blockNumber*(vmState: BaseVMState): UInt256 =
|
method blockNumber*(vmState: BaseVMState): UInt256 =
|
||||||
|
|
Loading…
Reference in New Issue