diff --git a/zebra-chain/src/block/header.rs b/zebra-chain/src/block/header.rs index 110b859ae..9a0c24434 100644 --- a/zebra-chain/src/block/header.rs +++ b/zebra-chain/src/block/header.rs @@ -83,9 +83,9 @@ pub enum BlockTimeError { } impl Header { - /// TODO: Inline this function into zebra_consensus::block::check::is_time_valid_at. + /// TODO: Inline this function into zebra_consensus::block::check::time_is_valid_at. /// See https://github.com/ZcashFoundation/zebra/issues/1021 for more details. - pub fn is_time_valid_at( + pub fn time_is_valid_at( &self, now: DateTime, height: &Height, diff --git a/zebra-chain/src/block/tests/vectors.rs b/zebra-chain/src/block/tests/vectors.rs index 1860a81e7..4cf04ccef 100644 --- a/zebra-chain/src/block/tests/vectors.rs +++ b/zebra-chain/src/block/tests/vectors.rs @@ -186,10 +186,10 @@ fn block_limits_single_tx() { Block::zcash_deserialize(&data[..]).expect_err("block should not deserialize"); } -/// Test wrapper for `BlockHeader.is_time_valid_at`. +/// Test wrapper for `BlockHeader.time_is_valid_at`. /// /// Generates a block header, sets its `time` to `block_header_time`, then -/// calls `is_time_valid_at`. +/// calls `time_is_valid_at`. fn node_time_check( block_header_time: DateTime, now: DateTime, @@ -197,7 +197,7 @@ fn node_time_check( let mut header = generate::block_header(); header.time = block_header_time; // pass a zero height and hash - they are only used in the returned error - header.is_time_valid_at(now, &Height(0), &Hash([0; 32])) + header.time_is_valid_at(now, &Height(0), &Hash([0; 32])) } #[test] diff --git a/zebra-consensus/src/block/check.rs b/zebra-consensus/src/block/check.rs index 1ec64de22..0eb97a9ec 100644 --- a/zebra-consensus/src/block/check.rs +++ b/zebra-consensus/src/block/check.rs @@ -94,7 +94,7 @@ pub fn time_is_valid_at( height: &Height, hash: &Hash, ) -> Result<(), zebra_chain::block::BlockTimeError> { - header.is_time_valid_at(now, height, hash) + header.time_is_valid_at(now, height, hash) } /// Returns `Ok(())` if the block subsidy and miner fees in `block` are valid for `network`