diff --git a/crates/chain/src/keychain/txout_index.rs b/crates/chain/src/keychain/txout_index.rs index 0bdd6c94..cf0f21f8 100644 --- a/crates/chain/src/keychain/txout_index.rs +++ b/crates/chain/src/keychain/txout_index.rs @@ -154,8 +154,9 @@ impl Indexer for KeychainTxOutIndex { fn index_tx(&mut self, tx: &bitcoin::Transaction) -> Self::ChangeSet { let mut changeset = ChangeSet::::default(); + let txid = tx.compute_txid(); for (op, txout) in tx.output.iter().enumerate() { - changeset.append(self.index_txout(OutPoint::new(tx.compute_txid(), op as u32), txout)); + changeset.append(self.index_txout(OutPoint::new(txid, op as u32), txout)); } changeset }