Skip to content

Commit

Permalink
fix(utxorpc): map missing struct values (#387)
Browse files Browse the repository at this point in the history
Tx hash and block height are now correctly mapped into the corresponding utxorpc structures.
  • Loading branch information
Mercurial authored Feb 11, 2024
1 parent 4088c2d commit 6fc4074
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pallas-utxorpc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,7 @@ fn collect_all_aux_scripts(tx: &trv::MultiEraTx) -> Vec<u5c::Script> {

pub fn map_tx(tx: &trv::MultiEraTx) -> u5c::Tx {
u5c::Tx {
hash: tx.hash().to_vec().into(),

Check failure on line 411 in pallas-utxorpc/src/lib.rs

View workflow job for this annotation

GitHub Actions / Test Suite

struct `utxorpc::proto::cardano::v1::Tx` has no field named `hash`

Check failure on line 411 in pallas-utxorpc/src/lib.rs

View workflow job for this annotation

GitHub Actions / Check (windows-latest, stable)

struct `utxorpc::proto::cardano::v1::Tx` has no field named `hash`

Check failure on line 411 in pallas-utxorpc/src/lib.rs

View workflow job for this annotation

GitHub Actions / Check (ubuntu-latest, stable)

struct `utxorpc::proto::cardano::v1::Tx` has no field named `hash`

Check failure on line 411 in pallas-utxorpc/src/lib.rs

View workflow job for this annotation

GitHub Actions / Check (macOS-latest, stable)

struct `utxorpc::proto::cardano::v1::Tx` has no field named `hash`
inputs: tx.inputs().iter().map(|i| map_tx_input(i, tx)).collect(),
outputs: tx.outputs().iter().map(map_tx_output).collect(),
certificates: tx.certs().iter().map(map_cert).collect(),
Expand Down Expand Up @@ -468,6 +469,7 @@ pub fn map_block(block: &trv::MultiEraBlock) -> u5c::Block {
header: u5c::BlockHeader {
slot: block.slot(),
hash: block.hash().to_vec().into(),
height: block.number()

Check failure on line 472 in pallas-utxorpc/src/lib.rs

View workflow job for this annotation

GitHub Actions / Test Suite

struct `BlockHeader` has no field named `height`

Check failure on line 472 in pallas-utxorpc/src/lib.rs

View workflow job for this annotation

GitHub Actions / Check (windows-latest, stable)

struct `BlockHeader` has no field named `height`

Check failure on line 472 in pallas-utxorpc/src/lib.rs

View workflow job for this annotation

GitHub Actions / Check (ubuntu-latest, stable)

struct `BlockHeader` has no field named `height`

Check failure on line 472 in pallas-utxorpc/src/lib.rs

View workflow job for this annotation

GitHub Actions / Check (macOS-latest, stable)

struct `BlockHeader` has no field named `height`
}
.into(),
body: u5c::BlockBody {
Expand Down

0 comments on commit 6fc4074

Please sign in to comment.