Skip to content

Commit

Permalink
chore: rebase develop
Browse files Browse the repository at this point in the history
  • Loading branch information
quake committed Apr 12, 2019
1 parent d6ca06e commit 884bfa1
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 12 deletions.
2 changes: 1 addition & 1 deletion sync/src/relayer/block_transactions_process.rs
Expand Up @@ -2,7 +2,7 @@ use crate::relayer::Relayer;
use ckb_core::transaction::Transaction;
use ckb_network::{CKBProtocolContext, PeerIndex};
use ckb_protocol::{cast, BlockTransactions, FlatbuffersVectorIterator};
use ckb_shared::index::ChainIndex;
use ckb_shared::store::ChainStore;
use failure::Error as FailureError;
use std::convert::TryInto;
use std::sync::Arc;
Expand Down
2 changes: 1 addition & 1 deletion sync/src/relayer/get_block_proposal_process.rs
@@ -1,7 +1,7 @@
use crate::relayer::Relayer;
use ckb_network::{CKBProtocolContext, PeerIndex};
use ckb_protocol::{cast, GetBlockProposal, RelayMessage};
use ckb_shared::index::ChainIndex;
use ckb_shared::store::ChainStore;
use failure::Error as FailureError;
use flatbuffers::FlatBufferBuilder;
use log::warn;
Expand Down
2 changes: 1 addition & 1 deletion sync/src/relayer/get_block_transactions_process.rs
@@ -1,7 +1,7 @@
use crate::relayer::Relayer;
use ckb_network::{CKBProtocolContext, PeerIndex};
use ckb_protocol::{cast, GetBlockTransactions, RelayMessage};
use ckb_shared::index::ChainIndex;
use ckb_shared::store::ChainStore;
use failure::Error as FailureError;
use flatbuffers::FlatBufferBuilder;
use log::{debug, warn};
Expand Down
9 changes: 3 additions & 6 deletions sync/src/relayer/mod.rs
Expand Up @@ -51,10 +51,7 @@ pub struct Relayer<CS> {
peers: Arc<Peers>,
}

impl<CI> Clone for Relayer<CI>
where
CI: ckb_shared::index::ChainIndex,
{
impl<CS: ChainStore> Clone for Relayer<CS> {
fn clone(&self) -> Self {
Relayer {
chain: self.chain.clone(),
Expand All @@ -65,8 +62,8 @@ where
}
}

impl<CI: ChainIndex> Relayer<CI> {
pub fn new(chain: ChainController, shared: Shared<CI>, peers: Arc<Peers>) -> Self {
impl<CS: ChainStore> Relayer<CS> {
pub fn new(chain: ChainController, shared: Shared<CS>, peers: Arc<Peers>) -> Self {
Relayer {
chain,
shared,
Expand Down
2 changes: 1 addition & 1 deletion sync/src/synchronizer/block_process.rs
Expand Up @@ -2,7 +2,7 @@ use crate::synchronizer::Synchronizer;
use ckb_core::block::Block;
use ckb_network::{CKBProtocolContext, PeerIndex};
use ckb_protocol::Block as PBlock;
use ckb_shared::index::ChainIndex;
use ckb_shared::store::ChainStore;
use failure::Error as FailureError;
use log::debug;
use std::convert::TryInto;
Expand Down
2 changes: 1 addition & 1 deletion sync/src/synchronizer/get_blocks_process.rs
@@ -1,7 +1,7 @@
use crate::synchronizer::Synchronizer;
use ckb_network::{CKBProtocolContext, PeerIndex};
use ckb_protocol::{cast, GetBlocks, SyncMessage};
use ckb_shared::index::ChainIndex;
use ckb_shared::store::ChainStore;
use failure::Error as FailureError;
use flatbuffers::FlatBufferBuilder;
use log::{debug, warn};
Expand Down
2 changes: 1 addition & 1 deletion sync/src/synchronizer/get_headers_process.rs
Expand Up @@ -3,7 +3,7 @@ use crate::MAX_LOCATOR_SIZE;
use ckb_core::header::Header;
use ckb_network::{Behaviour, CKBProtocolContext, PeerIndex};
use ckb_protocol::{cast, GetHeaders, SyncMessage};
use ckb_shared::index::ChainIndex;
use ckb_shared::store::ChainStore;
use failure::Error as FailureError;
use flatbuffers::FlatBufferBuilder;
use log::{debug, info, warn};
Expand Down

0 comments on commit 884bfa1

Please sign in to comment.