Revert "Transaction Queue integration"

This commit is contained in:
Gav Wood
2016-03-05 12:53:54 +01:00
parent 5ac0da6bba
commit d330f0b7b7
9 changed files with 80 additions and 219 deletions

View File

@@ -54,7 +54,6 @@ extern crate ethcore;
extern crate env_logger;
extern crate time;
extern crate rand;
extern crate rayon;
#[macro_use]
extern crate heapsize;
@@ -71,7 +70,8 @@ use io::NetSyncIo;
mod chain;
mod io;
mod range_collection;
mod transaction_queue;
// TODO [todr] Made public to suppress dead code warnings
pub mod transaction_queue;
#[cfg(test)]
mod tests;
@@ -153,14 +153,8 @@ impl NetworkProtocolHandler<SyncMessage> for EthSync {
}
fn message(&self, io: &NetworkContext<SyncMessage>, message: &SyncMessage) {
match *message {
SyncMessage::BlockVerified => {
self.sync.write().unwrap().chain_blocks_verified(&mut NetSyncIo::new(io, self.chain.deref()));
},
SyncMessage::NewChainBlocks { ref good, ref retracted } => {
let sync_io = NetSyncIo::new(io, self.chain.deref());
self.sync.write().unwrap().chain_new_blocks(&sync_io, good, retracted);
}
if let SyncMessage::BlockVerified = *message {
self.sync.write().unwrap().chain_blocks_verified(&mut NetSyncIo::new(io, self.chain.deref()));
}
}
}