Skip to content

Commit

Permalink
refactor: improve data serialization and testing accuracy
Browse files Browse the repository at this point in the history
- modify the pallaschainobserver implementation to serialize the output datum inline if present, instead of unconditionally.
  • Loading branch information
falcucci committed Jan 26, 2024
1 parent a8fa078 commit 14437d1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mithril-common/src/chain_observer/pallas_observer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,10 @@ impl PallasChainObserver {
.utxo
.iter()
.filter_map(|(_, utxo)| match utxo {
TransactionOutput::Current(output) => Some(self.serialize_datum(output)),
TransactionOutput::Current(output) => output
.inline_datum
.as_ref()
.map(|_| self.serialize_datum(output)),
_ => None,
})
.collect::<StdResult<Datums>>()
Expand Down

0 comments on commit 14437d1

Please sign in to comment.