diff --git a/ethereumj-core/TODO.md b/ethereumj-core/TODO.md index 8ad56122..0cbf0fe5 100644 --- a/ethereumj-core/TODO.md +++ b/ethereumj-core/TODO.md @@ -3,19 +3,19 @@ ##### TODO list: ---------------- -- [X] **State management** trie for storage hash calculation +- [x] **State management** trie for storage hash calculation and update hash into AccountState - [ ] **GUI screen** a screen that will hold table with full state representation - [ ] **SerpentCompiler** compile create(gas, mem_start, import("examples/mul2.se")) https://github.com/ethereum/wiki/wiki/Serpent - [ ] **SerpentCompiler** compile return(array) correct -- [ ] **VM execution:** SUICIDE op adjust +- [x] **VM execution:** SUICIDE op adjust - [ ] **ProgramPlayDialog** support internal calls - [ ] **Build:** extract core module and studio application - [ ] **Performance:** BigInteger math change for constant arrays implementation economy for memory allocation - [ ] **Command Line:** add the headless run option -- [ ] **Testing by JSON files:** follow cpp client performs test case by getting json file contains the test describe +- [x] **Testing by JSON files:** follow cpp client performs test case by getting json file contains the test describe - [ ] **SerpentCompiler** Serpent new syntax: (@> @< @/ @%) - unsigned operations > < / % - default are all signed operations diff --git a/ethereumj-core/src/main/java/org/ethereum/db/Repository.java b/ethereumj-core/src/main/java/org/ethereum/db/Repository.java index 3f7716f9..691d86b4 100644 --- a/ethereumj-core/src/main/java/org/ethereum/db/Repository.java +++ b/ethereumj-core/src/main/java/org/ethereum/db/Repository.java @@ -232,12 +232,13 @@ public class Repository { public void saveCode(byte[] address, byte[] code) { + if (code == null) return; + if (logger.isDebugEnabled()) logger.debug("saveCode: \n address: [ {} ], \n code: [ {} ]", Hex.toHexString(address), Hex.toHexString(code)); - if (code == null) return; AccountState state = getAccountState(address); if (state == null) return; diff --git a/ethereumj-core/src/main/java/org/ethereum/jsontestsuite/TestRunner.java b/ethereumj-core/src/main/java/org/ethereum/jsontestsuite/TestRunner.java index 2ea12876..7af59399 100644 --- a/ethereumj-core/src/main/java/org/ethereum/jsontestsuite/TestRunner.java +++ b/ethereumj-core/src/main/java/org/ethereum/jsontestsuite/TestRunner.java @@ -190,6 +190,11 @@ public class TestRunner { } } + // TODO: assert that you have no extra accounts in the repository + // TODO: -> basically the deleted by suicide should be deleted + // TODO: -> and no unexpected created + + List resultCallCreates = program.getResult().getCallCreateList(); diff --git a/ethereumj-core/src/main/java/org/ethereum/vm/ProgramResult.java b/ethereumj-core/src/main/java/org/ethereum/vm/ProgramResult.java index 6b952f65..7c0dfd31 100644 --- a/ethereumj-core/src/main/java/org/ethereum/vm/ProgramResult.java +++ b/ethereumj-core/src/main/java/org/ethereum/vm/ProgramResult.java @@ -74,6 +74,8 @@ public class ProgramResult { public void addDeleteAccounts(List accounts){ + if (accounts == null) return; + if (deleteAccounts == null){ deleteAccounts = new ArrayList<>(); }