fixes NUMBER opcode
This commit is contained in:
parent
a28f06a825
commit
67c38b0275
|
@ -49,7 +49,9 @@ method timestamp*(vmState: BaseVMState): EthTime {.base, gcsafe.} =
|
|||
vmState.blockHeader.timestamp
|
||||
|
||||
method blockNumber*(vmState: BaseVMState): BlockNumber {.base, gcsafe.} =
|
||||
vmState.blockHeader.blockNumber
|
||||
# it should return current block number
|
||||
# and not head.blockNumber
|
||||
vmState.blockHeader.blockNumber + 1
|
||||
|
||||
method difficulty*(vmState: BaseVMState): UInt256 {.base, gcsafe.} =
|
||||
vmState.blockHeader.difficulty
|
||||
|
|
|
@ -264,12 +264,12 @@ suite "Custom Opcodes Test":
|
|||
TimeStamp
|
||||
stack: "0x0000000000000000000000000000000000000000000000000000000055c46bb3"
|
||||
|
||||
# current number or parent number?
|
||||
# it should be current block number
|
||||
assembler: # NUMBER OP
|
||||
title: "NUMBER_1"
|
||||
code:
|
||||
Number
|
||||
stack: "0x000000000000000000000000000000000000000000000000000000000000b864"
|
||||
stack: "0x000000000000000000000000000000000000000000000000000000000000b865"
|
||||
|
||||
# current difficulty or parent dificulty?
|
||||
assembler: # DIFFICULTY OP
|
||||
|
|
Loading…
Reference in New Issue