Skip to content

Commit 206678f

Browse files
author
Ludo Galabru
committed
fix: use first input to stick with ord spec interpretation / implementation
1 parent fe8ce45 commit 206678f

File tree

1 file changed

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

1 file changed

+3
-2
lines changed

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

+3-2
Original file line numberDiff line numberDiff line change
@@ -430,8 +430,9 @@ fn try_parse_ordinal_operation(
430430
_block_height: u64,
431431
_ctx: &Context,
432432
) -> Option<OrdinalOperation> {
433-
for input in tx.vin.iter() {
434-
if let Some(ref witnesses) = input.txinwitness {
433+
// This should eventually become a loop once/if there is settlement on https://github.com/casey/ord/issues/2000.
434+
if let Some(first_input) = tx.vin.get(0) {
435+
if let Some(ref witnesses) = first_input.txinwitness {
435436
for bytes in witnesses.iter() {
436437
let script = Script::from(bytes.to_vec());
437438
let parser = InscriptionParser {

0 commit comments

Comments
 (0)