fix(utxorpc): map missing struct values (#387)
Tx hash and block height are now correctly mapped into the corresponding utxorpc structures.
This commit is contained in:
parent
4088c2dfcb
commit
6fc4074c02
1 changed files with 2 additions and 0 deletions
|
|
@ -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(),
|
||||
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(),
|
||||
|
|
@ -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()
|
||||
}
|
||||
.into(),
|
||||
body: u5c::BlockBody {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue