Skip to content

Commit

Permalink
consensus: Make future handling a little nicer
Browse files Browse the repository at this point in the history
  • Loading branch information
teor2345 committed Jun 11, 2020
1 parent 42e0985 commit ab781cb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions zebra-consensus/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ edition = "2018"
[dependencies]
zebra-chain = { path = "../zebra-chain" }
zebra-state = { path = "../zebra-state" }
futures-util = "0.3.5"
tower = "0.3.1"

[dev-dependencies]
Expand Down
3 changes: 2 additions & 1 deletion zebra-consensus/src/verify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
//! Verification is provided via a `tower::Service`, to support backpressure and batch
//! verification.
use futures_util::FutureExt;
use std::{
error,
future::Future,
Expand Down Expand Up @@ -80,7 +81,7 @@ where
block: block.into(),
});

Box::pin(async move { Ok(header_hash) })
async move { Ok(header_hash) }.boxed()
}
}

Expand Down

0 comments on commit ab781cb

Please sign in to comment.