Skip to content

Commit 03783a4

Browse files
author
Ludo Galabru
committed
fix: invalid bitcoin txid
1 parent 97a19d5 commit 03783a4

File tree

1 file changed

+2
-1
lines changed
  • components/chainhook-event-observer/src/indexer/bitcoin

1 file changed

+2
-1
lines changed

components/chainhook-event-observer/src/indexer/bitcoin/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ pub fn standardize_bitcoin_block(
5353
let block = rpc.get_block(&block_hash).unwrap();
5454

5555
for mut tx in block.txdata.into_iter() {
56+
let txid = tx.txid().to_string();
5657
let mut inputs = vec![];
5758
for input in tx.input.drain(..) {
5859
inputs.push(TxIn {
@@ -76,7 +77,7 @@ pub fn standardize_bitcoin_block(
7677

7778
let tx = BitcoinTransactionData {
7879
transaction_identifier: TransactionIdentifier {
79-
hash: format!("0x{}", tx.txid().to_string()),
80+
hash: format!("0x{}", txid),
8081
},
8182
operations: vec![],
8283
metadata: BitcoinTransactionMetadata { inputs, outputs },

0 commit comments

Comments
 (0)