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

Function num_blocks_per_network

bridge/src/utils.rs:11–17  ·  view source on GitHub ↗
(network: Network, mainnet_num_blocks: u32)

Source from the content-addressed store, hash-verified

9const NUM_BLOCKS_TESTNET: u32 = 2;
10
11pub fn num_blocks_per_network(network: Network, mainnet_num_blocks: u32) -> u32 {
12 match network {
13 Network::Bitcoin => mainnet_num_blocks,
14 Network::Regtest => NUM_BLOCKS_REGTEST,
15 _ => NUM_BLOCKS_TESTNET, // Testnet, Signet
16 }
17}
18
19pub fn remove_script_and_control_block_from_witness(mut witness: Vec<Vec<u8>>) -> Vec<Vec<u8>> {
20 witness.truncate(witness.len() - 2);

Callers 6

newMethod · 0.85
newMethod · 0.85
newMethod · 0.85
newMethod · 0.85
newMethod · 0.85
wait_for_timelock_expiryFunction · 0.85

Calls

no outgoing calls

Tested by 1

wait_for_timelock_expiryFunction · 0.68