bitcoin::secp256k1::rand::{self, RngCore},
};
#[test]
fn height_limit() {
{
let context = Context::builder().args(["--height-limit", "0"]).build();
context.mine_blocks(1);
assert_eq!(context.index.block_height().unwrap(), None);
assert_eq!(context.index.block_count().unwrap(), 0);
}
{
let context = Context::builder().args(["--height-limit", "1"]).build();
context.mine_blocks(1);
assert_eq!(context.index.block_height().unwrap(), Some(Height(0)));
assert_eq!(context.index.block_count().unwrap(), 1);
}
{
let context = Context::builder().args(["--height-limit", "2"]).build();
context.mine_blocks(2);
assert_eq!(context.index.block_height().unwrap(), Some(Height(1)));
assert_eq!(context.index.block_count().unwrap(), 2);
}
}
#[test]
fn inscriptions_below_first_inscription_height_are_skipped() {
let inscription = inscription("text/plain;charset=utf-8", "hello");
let template = TransactionTemplate {