diff --git a/servers/src/common/adapters.rs b/servers/src/common/adapters.rs index b54cd2d35..279919cab 100644 --- a/servers/src/common/adapters.rs +++ b/servers/src/common/adapters.rs @@ -210,7 +210,9 @@ impl p2p::ChainAdapter for NetToChainAdapter { // pushing the new block header through the header chain pipeline // we will go ask for the block if this is a new header - let res = self.chain().process_block_header(&bh, self.chain_opts(false)); + let res = self + .chain() + .process_block_header(&bh, self.chain_opts(false)); if let &Err(ref e) = &res { debug!("Block header {} refused by chain: {:?}", bhash, e.kind()); @@ -434,7 +436,10 @@ impl NetToChainAdapter { let bhash = b.hash(); let previous = self.chain().get_previous_header(&b.header); - match self.chain().process_block(b, self.chain_opts(was_requested)) { + match self + .chain() + .process_block(b, self.chain_opts(was_requested)) + { Ok(_) => { self.validate_chain(bhash); self.check_compact(); @@ -601,7 +606,6 @@ impl NetToChainAdapter { /// accepted a new block, asking the pool to update its state and /// the network to broadcast the block pub struct ChainToPoolAndNetAdapter { - sync_state: Arc, tx_pool: Arc>, peers: OneTime>, } @@ -671,12 +675,8 @@ impl ChainAdapter for ChainToPoolAndNetAdapter { impl ChainToPoolAndNetAdapter { /// Construct a ChainToPoolAndNetAdapter instance. - pub fn new( - sync_state: Arc, - tx_pool: Arc>, - ) -> ChainToPoolAndNetAdapter { + pub fn new(tx_pool: Arc>) -> ChainToPoolAndNetAdapter { ChainToPoolAndNetAdapter { - sync_state, tx_pool, peers: OneTime::new(), } diff --git a/servers/src/grin/server.rs b/servers/src/grin/server.rs index 348419e7d..0c8f08ac2 100644 --- a/servers/src/grin/server.rs +++ b/servers/src/grin/server.rs @@ -128,10 +128,7 @@ impl Server { let sync_state = Arc::new(SyncState::new()); - let chain_adapter = Arc::new(ChainToPoolAndNetAdapter::new( - sync_state.clone(), - tx_pool.clone(), - )); + let chain_adapter = Arc::new(ChainToPoolAndNetAdapter::new(tx_pool.clone())); let genesis = match config.chain_type { global::ChainTypes::AutomatedTesting => genesis::genesis_dev(),