let rpc_server = test_bitcoincore_rpc::spawn();
create_wallet(&rpc_server);
rpc_server.mine_blocks(1);
let parent_id = "0000000000000000000000000000000000000000000000000000000000000000i0";
CommandBuilder::new(format!(
"wallet inscribe --fee-rate 1.0 --parent {parent_id} --file child.png"
))
.write("child.png", [1; 520])
.rpc_server(&rpc_server)
.expected_stderr(format!("error: parent {parent_id} does not exist\n"))
.expected_exit_code(1)
.run_and_extract_stdout();
}
#[test]
fn inscribe_with_parent_inscription_and_fee_rate() {
let rpc_server = test_bitcoincore_rpc::spawn();
create_wallet(&rpc_server);
rpc_server.mine_blocks(1);
let parent_output = CommandBuilder::new("wallet inscribe --fee-rate 5.0 --file parent.png")
.write("parent.png", [1; 520])
.rpc_server(&rpc_server)
.run_and_deserialize_output::<Inscribe>();
assert_eq!(rpc_server.descriptors().len(), 3);
let parent_id = parent_output.inscriptions[0].id;
let commit_tx = &rpc_server.mempool()[0];
let reveal_tx = &rpc_server.mempool()[1];