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

Function test_target_conversion

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

Source from the content-addressed store, hash-verified

962
963 #[test]
964 fn test_target_conversion() {
965 for (_, _, bits, _) in DIFFICULTY_ADJUSTMENTS {
966 let compact_target = bits_to_target(bits);
967 let nbits = target_to_bits(&compact_target);
968 assert_eq!(nbits, bits);
969 }
970 }
971
972 #[test]
973 fn test_bits_to_target() {

Callers

nothing calls this directly

Calls 2

bits_to_targetFunction · 0.85
target_to_bitsFunction · 0.85

Tested by

no test coverage detected