block: Block, height: Height, best_height: Height, inscriptions: Vec, ) -> Self { Self { hash: block.header.block_hash(), target: target_as_block_hash(block.header.target()), height: height.0, best_height: best_height.0, inscriptions, } } } impl PageContent for BlockHtml { fn title(&self) -> String { format!("Block {}", self.height) } } #[cfg(test)] mod tests { use super::*; #[test] fn html() { assert_regex_match!( BlockHtml::new( Chain::Mainnet.genesis_block(), Height(0), Height(0), 0, Vec::new() ), "

Block 0

hash
[[:xdigit:]]{64}
target
[[:xdigit:]]{64}
timestamp
size
285
weight
1140
.* prev next