Skip to content

Commit 7b594e9

Browse files
authored
Merge pull request #373 from Emurgo/ruslan/costmodel-test
Fixing hash_script_data
2 parents 56ea7d4 + 5dfc32e commit 7b594e9

File tree

6 files changed

+8
-10
lines changed

6 files changed

+8
-10
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cardano-serialization-lib",
3-
"version": "10.0.3",
3+
"version": "10.0.4-beta.4",
44
"description": "(De)serialization functions for the Cardano blockchain along with related utility functions",
55
"scripts": {
66
"rust:build-nodejs": "(rimraf ./rust/pkg && cd rust; wasm-pack build --target=nodejs; wasm-pack pack) && npm run js:flowgen",

rust/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
[package]
22
name = "cardano-serialization-lib"
3-
version = "10.0.3"
3+
version = "10.0.4-beta.4"
44
edition = "2018"
55
authors = ["EMURGO"]
66
license = "MIT"
77
description = "(De)serialization functions for the Cardano blockchain along with related utility functions"
88
documentation = "https://docs.cardano.org/cardano-components/cardano-serialization-lib"
99
repository = "https://github.com/Emurgo/cardano-serialization-lib"
10+
readme="../README.md"
1011
exclude = [
1112
"pkg/*",
1213
]

rust/src/plutus.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1272,12 +1272,12 @@ mod tests {
12721272
// witness_set should have fixed length array
12731273
let mut witness_set = TransactionWitnessSet::new();
12741274
witness_set.set_plutus_data(&list);
1275-
assert_eq!("a1048101", hex::encode(witness_set.to_bytes()));
1275+
assert_eq!("a1049f01ff", hex::encode(witness_set.to_bytes()));
12761276

12771277
list = PlutusList::new();
12781278
list.add(&datum);
12791279
witness_set.set_plutus_data(&list);
1280-
assert_eq!(format!("a10481{}", datum_cli), hex::encode(witness_set.to_bytes()));
1280+
assert_eq!(format!("a1049f{}ff", datum_cli), hex::encode(witness_set.to_bytes()));
12811281
}
12821282

12831283
#[test]

rust/src/serialization.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1806,10 +1806,7 @@ impl cbor_event::se::Serialize for TransactionWitnessSet {
18061806
}
18071807
if let Some(field) = &self.plutus_data {
18081808
serializer.write_unsigned_integer(4)?;
1809-
serializer.write_array(cbor_event::Len::Len(field.len() as u64))?;
1810-
for i in 0..field.len() {
1811-
field.get(i).serialize(serializer)?;
1812-
}
1809+
field.serialize(serializer)?;
18131810
}
18141811
if let Some(field) = &self.redeemers {
18151812
serializer.write_unsigned_integer(5)?;

0 commit comments

Comments
 (0)