From e479e8ca973ccd9e918518dbff5c7f6cf7e78785 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Mon, 25 Jan 2016 23:37:49 +0100 Subject: [PATCH] Tody ups. --- src/state.rs | 4 ++-- src/tests/chain.rs | 17 ++++++++++++++--- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/src/state.rs b/src/state.rs index 71ae0ecda..7310f63a7 100644 --- a/src/state.rs +++ b/src/state.rs @@ -3,7 +3,7 @@ use engine::Engine; use executive::Executive; use pod_account::*; use pod_state::*; -use state_diff::*; +//use state_diff::*; // TODO: uncomment once to_pod() works correctly. /// TODO [Gav Wood] Please document me pub type ApplyResult = Result; @@ -145,12 +145,12 @@ impl State { /// Execute a given transaction. /// This will change the state accordingly. pub fn apply(&mut self, env_info: &EnvInfo, engine: &Engine, t: &Transaction) -> ApplyResult { - // let old = self.to_pod(); let e = try!(Executive::new(self, env_info, engine).transact(t)); //println!("Executed: {:?}", e); + // TODO uncomment once to_pod() works correctly. // trace!("Applied transaction. Diff:\n{}\n", StateDiff::diff_pod(&old, &self.to_pod())); self.commit(); let receipt = Receipt::new(self.root().clone(), e.cumulative_gas_used, e.logs); diff --git a/src/tests/chain.rs b/src/tests/chain.rs index aeb92d3fd..89199feed 100644 --- a/src/tests/chain.rs +++ b/src/tests/chain.rs @@ -47,7 +47,18 @@ fn do_json_test(json_data: &[u8]) -> Vec { failed } -// Fails. TODO: figure out why. -//declare_test!{BlockchainTests_bcStateTest, "BlockchainTests/bcStateTest"} - +declare_test!{ignore => BlockchainTests_bcBlockGasLimitTest, "BlockchainTests/bcBlockGasLimitTest"} // UNKNOWN declare_test!{BlockchainTests_bcForkBlockTest, "BlockchainTests/bcForkBlockTest"} +declare_test!{ignore => BlockchainTests_bcForkStressTest, "BlockchainTests/bcForkStressTest"} // UNKNOWN +declare_test!{ignore => BlockchainTests_bcForkUncle, "BlockchainTests/bcForkUncle"} // UNKNOWN +declare_test!{ignore => BlockchainTests_bcGasPricerTest, "BlockchainTests/bcGasPricerTest"} // UNKNOWN +declare_test!{ignore => BlockchainTests_bcInvalidHeaderTest, "BlockchainTests/bcInvalidHeaderTest"} // UNKNOWN +declare_test!{ignore => BlockchainTests_bcInvalidRLPTest, "BlockchainTests/bcInvalidRLPTest"} // UNKNOWN +declare_test!{ignore => BlockchainTests_bcMultiChainTest, "BlockchainTests/bcMultiChainTest"} // UNKNOWN +declare_test!{ignore => BlockchainTests_bcRPC_API_Test, "BlockchainTests/bcRPC_API_Test"} // UNKNOWN +declare_test!{ignore => BlockchainTests_bcStateTest, "BlockchainTests/bcStateTest"} // FAILS (Suicides, GasUsed) +declare_test!{ignore => BlockchainTests_bcTotalDifficultyTest, "BlockchainTests/bcTotalDifficultyTest"} // UNKNOWN +declare_test!{ignore => BlockchainTests_bcUncleHeaderValiditiy, "BlockchainTests/bcUncleHeaderValiditiy"}// UNKNOWN +declare_test!{ignore => BlockchainTests_bcUncleTest, "BlockchainTests/bcUncleTest"} // UNKNOWN +declare_test!{ignore => BlockchainTests_bcValidBlockTest, "BlockchainTests/bcValidBlockTest"} // UNKNOWN +declare_test!{ignore => BlockchainTests_bcWalletTest, "BlockchainTests/bcWalletTest"} // UNKNOWN