From 8ee0ab4e89646ef64afc21300628d5d0719335fd Mon Sep 17 00:00:00 2001 From: jangko Date: Mon, 1 Jun 2020 13:58:14 +0700 Subject: [PATCH] fix macro_assembler -> add call to acounts_cache.persist --- tests/macro_assembler.nim | 4 +++- tests/test_op_memory.nim | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/macro_assembler.nim b/tests/macro_assembler.nim index 91053e1b6..a1fd93d10 100644 --- a/tests/macro_assembler.nim +++ b/tests/macro_assembler.nim @@ -301,8 +301,10 @@ proc runVM*(blockNumber: Uint256, chainDB: BaseChainDB, boa: Assembler): bool = error "different memory value", idx=i, expected=mem, actual=actual return false + var stateDB = computation.vmState.accountDb + stateDB.persist() + var - stateDB = computation.vmState.accountDb storageRoot = stateDB.getStorageRoot(computation.msg.contractAddress) trie = initSecureHexaryTrie(chainDB.db, storageRoot) diff --git a/tests/test_op_memory.nim b/tests/test_op_memory.nim index 8df645f4f..26a43909d 100644 --- a/tests/test_op_memory.nim +++ b/tests/test_op_memory.nim @@ -840,3 +840,6 @@ proc opMemoryMain*() = "0x00" "0x00" "0x0000000000000000000000000000002000000000000000000000000000000000" + +when isMainModule: + opMemoryMain()