Fix deserialization of SerializedProgram into wrong Plutus version wrappers.
This commit is contained in:
parent
c3b07dfe83
commit
a9675fedc6
|
@ -1,5 +1,11 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## v1.1.8 - UNRELEASED
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- **aiken**: Fix `aiken blueprint policy` computing hashes as PlutusV1, instead of relying on the plutus version from the Blueprint. @KtorZ
|
||||||
|
|
||||||
## v1.1.7 - 2024-11-19
|
## v1.1.7 - 2024-11-19
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
|
@ -239,7 +239,7 @@ impl<'a> Deserialize<'a> for SerializableProgram {
|
||||||
.and_then(|program| {
|
.and_then(|program| {
|
||||||
let cbor = || program.to_cbor().unwrap().into();
|
let cbor = || program.to_cbor().unwrap().into();
|
||||||
|
|
||||||
if conway::PlutusScript::<1>(cbor()).compute_hash().to_string() == hash {
|
if conway::PlutusScript::<3>(cbor()).compute_hash().to_string() == hash {
|
||||||
return Ok(SerializableProgram::PlutusV3Program(program));
|
return Ok(SerializableProgram::PlutusV3Program(program));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -247,7 +247,7 @@ impl<'a> Deserialize<'a> for SerializableProgram {
|
||||||
return Ok(SerializableProgram::PlutusV2Program(program));
|
return Ok(SerializableProgram::PlutusV2Program(program));
|
||||||
}
|
}
|
||||||
|
|
||||||
if conway::PlutusScript::<3>(cbor()).compute_hash().to_string() == hash {
|
if conway::PlutusScript::<1>(cbor()).compute_hash().to_string() == hash {
|
||||||
return Ok(SerializableProgram::PlutusV1Program(program));
|
return Ok(SerializableProgram::PlutusV1Program(program));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue