context.index.assert_inscription_location(
inscription_id,
SatPoint {
outpoint: OutPoint { txid, vout: 0 },
offset: 0,
},
Some(50 * COIN_VALUE),
);
}
}
#[test]
fn inscription_with_pointer_is_cursed() {
for context in Context::configurations() {
context.mine_blocks(1);
let inscription = Inscription {
content_type: Some("text/plain".into()),
body: Some("pointer-child".into()),
pointer: Some(0u64.to_le_bytes().to_vec()),
..Default::default()
};
let txid = context.rpc_server.broadcast_tx(TransactionTemplate {
inputs: &[(1, 0, 0, inscription.to_witness())],
..Default::default()
});
context.mine_blocks(1);
let inscription_id = InscriptionId { txid, index: 0 };
context.index.assert_inscription_location(
inscription_id,
SatPoint {
outpoint: OutPoint { txid, vout: 0 },
offset: 0,
},
Some(50 * COIN_VALUE),