From 2d89f3da547d636c80282182b884b605dcec2f7a Mon Sep 17 00:00:00 2001 From: Matthias Benkort <5680256+KtorZ@users.noreply.github.com> Date: Sun, 25 Aug 2024 16:48:54 +0200 Subject: [PATCH] fix(primitives): patch remaining Conway issues (#505) * Expose private struct fields for ExUnitPrices. * Fix UpdateDRepCert variant argument. --- .../src/miniprotocols/localstate/queries_v16/mod.rs | 4 ++-- pallas-primitives/src/conway/model.rs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pallas-network/src/miniprotocols/localstate/queries_v16/mod.rs b/pallas-network/src/miniprotocols/localstate/queries_v16/mod.rs index 8a2b8d4a..5e4e8646 100644 --- a/pallas-network/src/miniprotocols/localstate/queries_v16/mod.rs +++ b/pallas-network/src/miniprotocols/localstate/queries_v16/mod.rs @@ -127,10 +127,10 @@ pub struct CostMdls { #[derive(Encode, Decode, Debug, PartialEq, Eq, Clone)] pub struct ExUnitPrices { #[n(0)] - mem_price: PositiveInterval, + pub mem_price: PositiveInterval, #[n(1)] - step_price: PositiveInterval, + pub step_price: PositiveInterval, } #[derive(Encode, Decode, Debug, PartialEq, Eq, Clone)] diff --git a/pallas-primitives/src/conway/model.rs b/pallas-primitives/src/conway/model.rs index 66c175d6..53f978bf 100644 --- a/pallas-primitives/src/conway/model.rs +++ b/pallas-primitives/src/conway/model.rs @@ -177,7 +177,7 @@ pub enum Certificate { ResignCommitteeCold(CommitteeColdCredential, Nullable), RegDRepCert(DRepCredential, Coin, Nullable), UnRegDRepCert(DRepCredential, Coin), - UpdateDRepCert(StakeCredential, Nullable), + UpdateDRepCert(DRepCredential, Nullable), } impl<'b, C> minicbor::decode::Decode<'b, C> for Certificate { @@ -1301,10 +1301,10 @@ pub use crate::alonzo::ExUnits; #[derive(Serialize, Deserialize, Encode, Decode, Debug, PartialEq, Eq, Clone)] pub struct ExUnitPrices { #[n(0)] - mem_price: RationalNumber, + pub mem_price: RationalNumber, #[n(1)] - step_price: RationalNumber, + pub step_price: RationalNumber, } #[derive(Serialize, Deserialize, Encode, Decode, Debug, PartialEq, Eq, Clone, Copy)]