SHOWING: First 60
#67,041,115text#66,361,297#60,753,951textuse super::*;
#[derive(Debug, Parser)]
pub(crate) struct Subsidy {
#[arg(help = "List sats in subsidy at <HEIGHT>.")]
height: Height,
}
#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct Output {
pub first: u64,
pub subsidy: u64,
pub name: String,
}
impl Subsidy {
pub(crate) fn run(self) -> SubcommandResult {
let first = self.height.starting_sat();
let subsidy = self.height.subsidy();
if subsidy == 0 {
bail!("block {} has no subsidy", self.height);
}
Ok(Box::new(Output {
first: first.0,
subsidy,
name: first.name(),
}))
}
}
#45,002,809text panic!();
}
format!("{}i{n}", hex.repeat(64)).parse().unwrap()
}
pub(crate) fn envelope(payload: &[&[u8]]) -> Witness {
let mut builder = script::Builder::new()
.push_opcode(opcodes::OP_FALSE)
.push_opcode(opcodes::all::OP_IF);
for data in payload {
let mut buf = PushBytesBuf::new();
buf.extend_from_slice(data).unwrap();
builder = builder.push_slice(buf);
}
let script = builder.push_opcode(opcodes::all::OP_ENDIF).into_script();
Witness::from_slice(&[script.into_bytes(), Vec::new()])
}
#45,002,805text Object::SatPoint(
"0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF:123:456"
.parse()
.unwrap(),
),
);
}
}
#44,982,151text#18,210,139