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

Function test_difficulty_adjustments

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

Source from the content-addressed store, hash-verified

985
986 #[test]
987 fn test_difficulty_adjustments() {
988 for (start_time, end_time, start_target, end_target) in DIFFICULTY_ADJUSTMENTS {
989 let new_target_bytes = calculate_new_difficulty(start_time, end_time, start_target);
990 let bits = target_to_bits(&new_target_bytes);
991 assert_eq!(bits, end_target);
992 }
993 }
994
995 #[test]
996 fn test_bridge_block_header_from_header() {

Callers

nothing calls this directly

Calls 2

calculate_new_difficultyFunction · 0.85
target_to_bitsFunction · 0.85

Tested by

no test coverage detected