fix(primitives): Fix overflow on cost model (#168)

This commit is contained in:
Santiago Carmuega 2022-08-08 09:11:57 -03:00 committed by GitHub
parent 69644d4a0e
commit 266df0fc18
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 1 deletions

View file

@ -636,7 +636,7 @@ pub enum Language {
PlutusV1,
}
pub type CostModel = MaybeIndefArray<i32>;
pub type CostModel = MaybeIndefArray<i64>;
pub type CostMdls = KeyValuePairs<Language, CostModel>;

View file

@ -595,6 +595,8 @@ mod tests {
include_str!("../../../test_data/babbage3.block"),
// peculiar block with single plutus cost model
include_str!("../../../test_data/babbage4.block"),
// peculiar block with i32 overlfow
include_str!("../../../test_data/babbage5.block"),
];
for (idx, block_str) in test_blocks.iter().enumerate() {

1
test_data/babbage5.block Normal file

File diff suppressed because one or more lines are too long