fix(primitives): Make cost models optional (#167)
This commit is contained in:
parent
180ab2bbde
commit
69644d4a0e
2 changed files with 5 additions and 2 deletions
|
|
@ -163,10 +163,10 @@ pub use crate::alonzo::CostModel;
|
|||
#[cbor(map)]
|
||||
pub struct CostMdls {
|
||||
#[n(0)]
|
||||
pub plutus_v1: CostModel,
|
||||
pub plutus_v1: Option<CostModel>,
|
||||
|
||||
#[n(1)]
|
||||
pub plutus_v2: CostModel,
|
||||
pub plutus_v2: Option<CostModel>,
|
||||
}
|
||||
|
||||
#[derive(Encode, Decode, Debug, PartialEq, Clone)]
|
||||
|
|
@ -593,6 +593,8 @@ mod tests {
|
|||
include_str!("../../../test_data/babbage1.block"),
|
||||
include_str!("../../../test_data/babbage2.block"),
|
||||
include_str!("../../../test_data/babbage3.block"),
|
||||
// peculiar block with single plutus cost model
|
||||
include_str!("../../../test_data/babbage4.block"),
|
||||
];
|
||||
|
||||
for (idx, block_str) in test_blocks.iter().enumerate() {
|
||||
|
|
|
|||
1
test_data/babbage4.block
Normal file
1
test_data/babbage4.block
Normal file
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue