1
0
Fork 0
mirror of https://github.com/romanz/electrs.git synced 2025-02-24 15:02:21 +01:00

Include blockhash on missing txid for merkle proof

This commit is contained in:
Roman Zeyde 2021-05-26 15:21:32 +03:00
parent 1d4ab4f325
commit 52443f370f

View file

@ -309,7 +309,7 @@ impl Rpc {
debug!("txids cache miss: {}", blockhash);
let txids = self.daemon.get_block_txids(blockhash)?;
match txids.iter().position(|current_txid| *current_txid == txid) {
None => bail!("missing tx {} for merkle proof", txid),
None => bail!("missing txid {} in block {}", txid, blockhash),
Some(position) => Ok(proof_to_value(&Proof::create(&txids, position))),
}
}