fix(traverse): fix conway txs not returning reference inputs (#388)
This commit is contained in:
parent
dd0d7de2ea
commit
25bbb925b2
1 changed files with 11 additions and 8 deletions
|
|
@ -198,17 +198,20 @@ impl<'b> MultiEraTx<'b> {
|
||||||
/// https://github.com/input-output-hk/cardano-ledger/commit/a342b74f5db3d3a75eae3e2abe358a169701b1e7
|
/// https://github.com/input-output-hk/cardano-ledger/commit/a342b74f5db3d3a75eae3e2abe358a169701b1e7
|
||||||
pub fn reference_inputs(&self) -> Vec<MultiEraInput> {
|
pub fn reference_inputs(&self) -> Vec<MultiEraInput> {
|
||||||
match self {
|
match self {
|
||||||
|
MultiEraTx::Conway(x) => x
|
||||||
|
.transaction_body
|
||||||
|
.reference_inputs
|
||||||
|
.iter()
|
||||||
|
.flatten()
|
||||||
|
.map(MultiEraInput::from_alonzo_compatible)
|
||||||
|
.collect(),
|
||||||
MultiEraTx::Babbage(x) => x
|
MultiEraTx::Babbage(x) => x
|
||||||
.transaction_body
|
.transaction_body
|
||||||
.reference_inputs
|
.reference_inputs
|
||||||
.as_ref()
|
.iter()
|
||||||
.map(|inputs| {
|
.flatten()
|
||||||
inputs
|
.map(MultiEraInput::from_alonzo_compatible)
|
||||||
.iter()
|
.collect(),
|
||||||
.map(MultiEraInput::from_alonzo_compatible)
|
|
||||||
.collect()
|
|
||||||
})
|
|
||||||
.unwrap_or_default(),
|
|
||||||
_ => vec![],
|
_ => vec![],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue