Skip to content

Commit

Permalink
consensus: Don't wrap CheckpointVerifier in a buffer
Browse files Browse the repository at this point in the history
The checkpoint verifier is not shared, so it doesn't need a buffer.

Part of #429.
  • Loading branch information
teor2345 committed Jun 19, 2020
1 parent 99af8a8 commit ea54df9
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions zebra-consensus/src/checkpoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use std::{
sync::Arc,
task::{Context, Poll},
};
use tower::{buffer::Buffer, Service};
use tower::Service;

use zebra_chain::block::{Block, BlockHeaderHash};
use zebra_chain::types::BlockHeight;
Expand Down Expand Up @@ -132,7 +132,6 @@ pub fn init<S>(
Error = Error,
Future = impl Future<Output = Result<BlockHeaderHash, Error>>,
> + Send
+ Clone
+ 'static
where
S: Service<zebra_state::Request, Response = zebra_state::Response, Error = Error>
Expand All @@ -141,13 +140,10 @@ where
+ 'static,
S::Future: Send + 'static,
{
Buffer::new(
CheckpointVerifier {
state_service,
checkpoint_list: checkpoint_list.into(),
},
1,
)
CheckpointVerifier {
state_service,
checkpoint_list: checkpoint_list.into(),
}
}

// TODO(teor): tests

0 comments on commit ea54df9

Please sign in to comment.