);
}
- self.watched_transactions.remove(&ctx.tx.txid());
+ self.watched_transactions.remove(&ctx.tx.compute_txid());
for input in &ctx.tx.input {
if let Some(output) = self.watched_outputs.remove(&input.previous_output) {
- let spent = (ctx.tx.txid(), ctx.block_height, input.previous_output, output);
+ let spent =
+ (ctx.tx.compute_txid(), ctx.block_height, input.previous_output, output);
self.outputs_spends_pending_threshold_conf.push(spent);
}
}
fn get_confirmed_tx(
&self, tx: &Transaction, prob_conf_height: u32,
) -> Result<ConfirmedTx, InternalError> {
- let txid = tx.txid();
+ let txid = tx.compute_txid();
match self.client.transaction_get_merkle(&txid, prob_conf_height as usize) {
Ok(merkle_res) => {
debug_assert_eq!(prob_conf_height, merkle_res.block_height as u32);
// unwrap() safety: len() > 0 is checked above
let pos = *indexes.first().unwrap() as usize;
if let Some(tx) = maybe_await!(self.client.get_tx(&txid))? {
- if tx.txid() != txid {
+ if tx.compute_txid() != txid {
log_error!(self.logger, "Retrieved transaction for txid {} doesn't match expectations. This should not happen. Please verify server integrity.", txid);
return Err(InternalError::Failed);
}
impl Confirm for TestConfirmable {
fn transactions_confirmed(&self, header: &Header, txdata: &TransactionData<'_>, height: u32) {
for (_, tx) in txdata {
- let txid = tx.txid();
+ let txid = tx.compute_txid();
let block_hash = header.block_hash();
self.confirmed_txs.lock().unwrap().insert(txid, (block_hash, height));
self.unconfirmed_txs.lock().unwrap().remove(&txid);