()
| 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() { |
nothing calls this directly
no test coverage detected