Skip to content

Commit

Permalink
fix(alonzo): Contemplate aux data with multiple plutus scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
scarmuega committed Jan 8, 2022
1 parent 539a17e commit 2bfc23e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pallas-alonzo/src/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use minicbor::{bytes::ByteVec, data::Tag};
use minicbor_derive::{Decode, Encode};
use std::{collections::BTreeMap, ops::Deref};

use crate::utils::{KeyValuePairs, MaybeIndefArray};
use crate::utils::{KeyValuePairs, MaybeIndefArray, SingleOrArray};

#[derive(Debug, PartialEq, PartialOrd, Eq, Ord)]
pub struct SkipCbor<const N: usize> {}
Expand Down Expand Up @@ -1230,7 +1230,7 @@ pub struct AlonzoAuxiliaryData {
#[n(1)]
pub native_scripts: Option<MaybeIndefArray<NativeScript>>,
#[n(2)]
pub plutus_scripts: Option<PlutusScript>,
pub plutus_scripts: Option<Vec<PlutusScript>>,
}

#[derive(Debug, PartialEq, Eq, PartialOrd, Ord)]
Expand Down Expand Up @@ -1423,6 +1423,9 @@ mod tests {
include_str!("test_data/test10.block"),
// peculiar block with protocol update params
include_str!("test_data/test11.block"),
// peculiar block with decoding issue
// https://github.com/txpipe/oura/issues/37
include_str!("test_data/test12.block"),
];

for (idx, block_str) in test_blocks.iter().enumerate() {
Expand Down
1 change: 1 addition & 0 deletions pallas-alonzo/src/test_data/test12.block

Large diffs are not rendered by default.

0 comments on commit 2bfc23e

Please sign in to comment.