From 47bc02ea44f70a683488f770e6ced787410d357c Mon Sep 17 00:00:00 2001 From: teor Date: Wed, 15 Jul 2020 13:11:48 +1000 Subject: [PATCH] partial revert: Use &Block, not Arc --- zebra-consensus/src/block.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zebra-consensus/src/block.rs b/zebra-consensus/src/block.rs index 277a1dd3..acdbdbce 100644 --- a/zebra-consensus/src/block.rs +++ b/zebra-consensus/src/block.rs @@ -61,7 +61,7 @@ pub(crate) fn node_time_check( /// fees paid by transactions included in this block."[S 3.10][3.10] /// /// [3.10]: https://zips.z.cash/protocol/protocol.pdf#coinbasetransactions -pub(crate) fn coinbase_is_first_check(block: Arc) -> Result<(), Error> { +pub(crate) fn coinbase_is_first_check(block: &Block) -> Result<(), Error> { if block.coinbase_height().is_some() { // No coinbase inputs in additional transactions allowed if block @@ -123,7 +123,7 @@ where let now = Utc::now(); node_time_check(block.header.time, now)?; block.header.is_equihash_solution_valid()?; - coinbase_is_first_check(block.clone())?; + coinbase_is_first_check(block.as_ref())?; // `Tower::Buffer` requires a 1:1 relationship between `poll()`s // and `call()`s, because it reserves a buffer slot in each