diff --git a/ethcore/src/engines/mod.rs b/ethcore/src/engines/mod.rs index 3f1a131cf..cb13c984a 100644 --- a/ethcore/src/engines/mod.rs +++ b/ethcore/src/engines/mod.rs @@ -473,7 +473,7 @@ pub mod common { /// Trace rewards on closing block pub fn bestow_block_reward(block: &mut ExecutedBlock, engine: &E) -> Result<(), Error> { - let fields = block.fields_mut(); + let fields = block.fields_mut(); // Bestow block reward let reward = engine.params().block_reward; let res = fields.state.add_balance(fields.header.author(), &reward, CleanupMode::NoEmpty) @@ -482,9 +482,9 @@ pub mod common { let block_author = fields.header.author().clone(); fields.traces.as_mut().map(|mut traces| { - let mut tracer = ExecutiveTracer::default(); + let mut tracer = ExecutiveTracer::default(); tracer.trace_reward(block_author, engine.params().block_reward, RewardType::Block); - traces.push(tracer.traces()) + traces.push(tracer.drain()) }); // Commit state so that we can actually figure out the state root. diff --git a/ethcore/src/engines/null_engine.rs b/ethcore/src/engines/null_engine.rs index 5610894af..a52342c59 100644 --- a/ethcore/src/engines/null_engine.rs +++ b/ethcore/src/engines/null_engine.rs @@ -78,7 +78,7 @@ impl Engine for NullEngine { /// Block reward let tracing_enabled = block.tracing_enabled(); - let fields = block.fields_mut(); + let fields = block.fields_mut(); let mut tracer = ExecutiveTracer::default(); let result_block_reward = U256::from(1000000000); @@ -104,12 +104,12 @@ impl Engine for NullEngine { )?; if tracing_enabled { tracer.trace_reward(uncle_author, result_uncle_reward, RewardType::Uncle); - } + } } fields.state.commit()?; if tracing_enabled { - fields.traces.as_mut().map(|mut traces| traces.push(tracer.traces())); + fields.traces.as_mut().map(|mut traces| traces.push(tracer.drain())); } Ok(()) } diff --git a/ethcore/src/ethereum/ethash.rs b/ethcore/src/ethereum/ethash.rs index 2008caccf..ef997f5a8 100644 --- a/ethcore/src/ethereum/ethash.rs +++ b/ethcore/src/ethereum/ethash.rs @@ -338,7 +338,7 @@ impl Engine for Arc { // Commit state so that we can actually figure out the state root. fields.state.commit()?; if tracing_enabled { - fields.traces.as_mut().map(|mut traces| traces.push(tracer.traces())); + fields.traces.as_mut().map(|mut traces| traces.push(tracer.drain())); } Ok(()) } diff --git a/ethcore/src/trace/types/trace.rs b/ethcore/src/trace/types/trace.rs index ccbc89e25..01c5c4b43 100644 --- a/ethcore/src/trace/types/trace.rs +++ b/ethcore/src/trace/types/trace.rs @@ -219,28 +219,6 @@ impl Suicide { } } -impl Encodable for Suicide { - fn rlp_append(&self, s: &mut RlpStream) { - s.begin_list(3); - s.append(&self.address); - s.append(&self.refund_address); - s.append(&self.balance); - } -} - -impl Decodable for Suicide { - fn decode(rlp: &UntrustedRlp) -> Result { - let res = Suicide { - address: rlp.val_at(0)?, - refund_address: rlp.val_at(1)?, - balance: rlp.val_at(2)?, - }; - - Ok(res) - } -} - - /// Description of an action that we trace; will be either a call or a create. #[derive(Debug, Clone, PartialEq)] #[cfg_attr(feature = "ipc", binary)]