From fd7062fecbe85576e054eab5d6b3521a6192d094 Mon Sep 17 00:00:00 2001 From: coffeepots Date: Thu, 9 Aug 2018 22:06:36 +0100 Subject: [PATCH] Fix VMTest message creation in 32 bits, also duplicated word in comment --- nimbus/vm/code_stream.nim | 2 +- tests/test_vm_json.nim | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nimbus/vm/code_stream.nim b/nimbus/vm/code_stream.nim index 83876143f..4bcd20e2a 100644 --- a/nimbus/vm/code_stream.nim +++ b/nimbus/vm/code_stream.nim @@ -54,7 +54,7 @@ proc read*(c: var CodeStream, size: int): seq[byte] = c.pc = c.bytes.len proc readVmWord*(c: var CodeStream, n: int): UInt256 = - ## Reads `n` bytes bytes from the code stream and pads + ## Reads `n` bytes from the code stream and pads ## the remaining bytes with zeros. let result_bytes = cast[ptr array[32, byte]](addr result) diff --git a/tests/test_vm_json.nim b/tests/test_vm_json.nim index 4c58c8d31..fba5faa16 100644 --- a/tests/test_vm_json.nim +++ b/tests/test_vm_json.nim @@ -58,7 +58,7 @@ proc testFixture(fixtures: JsonNode, testStatusIMPL: var TestStatus) = let message = newMessage( to = toAddress, sender = fexec{"caller"}.getStr.parseAddress, - value = cast[uint](fexec{"value"}.getHexadecimalInt).u256, # Cast workaround for negative value + value = cast[uint64](fexec{"value"}.getHexadecimalInt).u256, # Cast workaround for negative value data = fexec{"data"}.getStr.hexToSeqByte, code = code, gas = fexec{"gas"}.getHexadecimalInt,