From 2ae74e2f1e5fdf690c14b3c7aab3dbd1ad172de8 Mon Sep 17 00:00:00 2001 From: "S. Matthew English" Date: Fri, 19 Oct 2018 02:16:07 -0400 Subject: [PATCH] [MINOR] Suicides mixing coinbase (#110) * naive solution * cleaning it up * restrict to only suicide tests --- .../vm/GeneralStateReferenceTestTools.java | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/ethereum/core/src/test/java/tech/pegasys/pantheon/ethereum/vm/GeneralStateReferenceTestTools.java b/ethereum/core/src/test/java/tech/pegasys/pantheon/ethereum/vm/GeneralStateReferenceTestTools.java index fe1e24e545..64a8292df3 100644 --- a/ethereum/core/src/test/java/tech/pegasys/pantheon/ethereum/vm/GeneralStateReferenceTestTools.java +++ b/ethereum/core/src/test/java/tech/pegasys/pantheon/ethereum/vm/GeneralStateReferenceTestTools.java @@ -86,14 +86,6 @@ public class GeneralStateReferenceTestTools { // Consumes a huge amount of memory params.blacklist("static_Call1MB1024Calldepth-(Byzantium|Constantinople)"); - // Needs investigation (tests pass in other clients) - params.blacklist("suicideCoinbase-Frontier"); - params.blacklist("suicideCoinbase-Homestead"); - params.blacklist("SuicidesMixingCoinbase-Frontier\\[0\\]"); - params.blacklist("SuicidesMixingCoinbase-Frontier\\[1\\]"); - params.blacklist("SuicidesMixingCoinbase-Homestead\\[0\\]"); - params.blacklist("SuicidesMixingCoinbase-Homestead\\[1\\]"); - // Constantinople failures to investigate params.blacklist("RevertInCreateInInitCreate2-Constantinople"); params.blacklist("RevertInCreateInInit-Constantinople"); @@ -128,12 +120,9 @@ public class GeneralStateReferenceTestTools { transaction, blockHeader.getCoinbase(), new BlockHashLookup(blockHeader, blockchain)); - - if (result.isInvalid()) { - final Account coinbase = worldStateUpdater.getOrCreate(spec.blockHeader().getCoinbase()); - if (coinbase != null && coinbase.isEmpty() && shouldClearEmptyAccounts(spec.eip())) { - worldStateUpdater.deleteAccount(coinbase.getAddress()); - } + final Account coinbase = worldStateUpdater.getOrCreate(spec.blockHeader().getCoinbase()); + if (coinbase != null && coinbase.isEmpty() && shouldClearEmptyAccounts(spec.eip())) { + worldStateUpdater.deleteAccount(coinbase.getAddress()); } worldStateUpdater.commit();