post-merge fixes

This commit is contained in:
Svyatoslav Nikolsky 2016-11-17 11:23:05 +03:00
parent 4e74bb7f68
commit b354b1e0cb
3 changed files with 5 additions and 9 deletions

View File

@ -46,7 +46,7 @@ pub trait OutboundSyncConnection : Send + Sync {
fn send_transaction(&self, message: &types::Tx);
fn send_block(&self, message: &types::Block, id: u32, is_final: bool);
fn send_headers(&self, message: &types::Headers, id: u32, is_final: bool);
fn send_mempool(&self, message: &types::MemPool, id: u32, is_final: bool);
fn send_mempool(&self, message: &types::MemPool);
fn send_filterload(&self, message: &types::FilterLoad);
fn send_filteradd(&self, message: &types::FilterAdd);
fn send_filterclear(&self, message: &types::FilterClear);
@ -106,8 +106,8 @@ impl OutboundSyncConnection for OutboundSync {
self.context.send_response(message, id, is_final);
}
fn send_mempool(&self, message: &types::MemPool, id: u32, is_final: bool) {
self.context.send_response(message, id, is_final);
fn send_mempool(&self, message: &types::MemPool) {
self.context.send_request(message);
}
fn send_filterload(&self, message: &types::FilterLoad) {

View File

@ -257,7 +257,7 @@ mod tests {
fn send_transaction(&self, _message: &types::Tx) {}
fn send_block(&self, _message: &types::Block, _id: u32, _is_final: bool) {}
fn send_headers(&self, _message: &types::Headers, _id: u32, _is_final: bool) {}
fn send_mempool(&self, _message: &types::MemPool, _id: u32, _is_final: bool) {}
fn send_mempool(&self, _message: &types::MemPool) {}
fn send_filterload(&self, _message: &types::FilterLoad) {}
fn send_filteradd(&self, _message: &types::FilterAdd) {}
fn send_filterclear(&self, _message: &types::FilterClear) {}

View File

@ -495,11 +495,7 @@ impl<T> Client for SynchronizationClient<T> where T: TaskExecutor {
// relay block to our peers
if self.state.is_saturated() {
let mut executor = self.executor.lock();
for peer in self.peers.all_peers() {
// TODO: Task::BroadcastBlock instead of cloning
executor.execute(Task::SendBlock(peer, block.clone()));
}
// TODO: Task::BroadcastBlock
}
// deal with block transactions