Rename any remaining is_time_valid_at instances

Automated search and replace, using the script:

sed -i 's/is_time_valid_at/time_is_valid_at/' \
    $(grep -r is_time_valid_at zebra* | cut -d: -f1 | sort -u)
This commit is contained in:
teor 2020-10-13 07:35:51 +10:00
parent d504232720
commit 407962b864
3 changed files with 6 additions and 6 deletions

View File

@ -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<Utc>,
height: &Height,

View File

@ -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<Utc>,
now: DateTime<Utc>,
@ -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]

View File

@ -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`