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

Function get_flags_for_block

bitvm/src/hash/blake3_utils.rs:519–530  ·  view source on GitHub ↗
(i: u32, num_blocks: u32)

Source from the content-addressed store, hash-verified

517}
518
519pub(crate) fn get_flags_for_block(i: u32, num_blocks: u32) -> u32 {
520 if num_blocks == 1 {
521 return 0b00001011;
522 }
523 if i == 0 {
524 return 0b00000001;
525 }
526 if i == num_blocks - 1 {
527 return 0b00001010;
528 }
529 0
530}
531
532#[cfg(test)]
533mod tests {

Callers 1

blake3Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected