MCPcopy Create free account
hub / github.com/BitVM/BitVM / test_block_hash_calculation

Function test_block_hash_calculation

header-chain/src/header_chain.rs:843–859  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

841
842 #[test]
843 fn test_block_hash_calculation() {
844 let merkle_root = hex!("3ba3edfd7a7b12b27ac72c3e67768f617fc81bc3888a51323a9fb8aa4b1e5e4a");
845 let expected_block_hash =
846 hex!("6fe28c0ab6f1b372c1a6a246ae63f74f931e8365e15a089c68d6190000000000");
847
848 let block_header = CircuitBlockHeader {
849 version: 1,
850 prev_block_hash: [0u8; 32],
851 merkle_root: merkle_root,
852 time: 1231006505,
853 bits: 486604799,
854 nonce: 2083236893,
855 };
856
857 let block_hash = block_header.compute_block_hash();
858 assert_eq!(block_hash, expected_block_hash);
859 }
860
861 #[test]
862 fn test_15_block_hash_calculation() {

Callers

nothing calls this directly

Calls 1

compute_block_hashMethod · 0.80

Tested by

no test coverage detected