Skip to content

Commit

Permalink
Add all transaction hex to block json response (ordinals#3805)
Browse files Browse the repository at this point in the history
  • Loading branch information
thewrlck committed Jun 8, 2024
1 parent 5617498 commit 4a2f072
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ pub struct Block {
pub inscriptions: Vec<InscriptionId>,
pub runes: Vec<SpacedRune>,
pub target: BlockHash,
pub transactions: Vec<bitcoin::blockdata::transaction::Transaction>,
}

impl Block {
Expand All @@ -36,6 +37,7 @@ impl Block {
best_height: best_height.0,
inscriptions,
runes,
transactions: block.txdata,
}
}
}
Expand Down
1 change: 1 addition & 0 deletions tests/json_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,7 @@ fn get_block() {
height: 0,
inscriptions: Vec::new(),
runes: Vec::new(),
transactions: block_json.transactions.clone(),
}
);
}
Expand Down

0 comments on commit 4a2f072

Please sign in to comment.