ExecutedBlock cleanup (#7991)

* ExecutedBlock cleanup

* authority round makes only one call to note_rewards

* move Tracing from block to trace module

* removed BlockRef
This commit is contained in:
Marek Kotewicz
2018-02-27 18:22:56 +01:00
committed by GitHub
parent 6445f12c2d
commit df63341eb4
10 changed files with 138 additions and 183 deletions

View File

@@ -63,7 +63,6 @@ use state_db::StateDB;
use state::{self, State};
use trace;
use trace::{TraceDB, ImportRequest as TraceImportRequest, LocalizedTrace, Database as TraceDatabase};
use trace::FlatTransactionTraces;
use transaction::{self, LocalizedTransaction, UnverifiedTransaction, SignedTransaction, Transaction, PendingTransaction, Action};
use types::filter::Filter;
use types::mode::Mode as IpcMode;
@@ -651,10 +650,7 @@ impl Client {
// Commit results
let receipts = block.receipts().to_owned();
let traces = block.traces().clone().unwrap_or_else(Vec::new);
let traces: Vec<FlatTransactionTraces> = traces.into_iter()
.map(Into::into)
.collect();
let traces = block.traces().clone().drain();
assert_eq!(header.hash(), BlockView::new(block_data).header_view().hash());