Skip to content

Commit

Permalink
fix(primitives): patch remaining Conway issues (#505)
Browse files Browse the repository at this point in the history
* Expose private struct fields for ExUnitPrices.
* Fix UpdateDRepCert variant argument.
  • Loading branch information
KtorZ authored Aug 25, 2024
1 parent 7aa5103 commit 2d89f3d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
6 changes: 3 additions & 3 deletions pallas-primitives/src/conway/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ pub enum Certificate {
ResignCommitteeCold(CommitteeColdCredential, Nullable<Anchor>),
RegDRepCert(DRepCredential, Coin, Nullable<Anchor>),
UnRegDRepCert(DRepCredential, Coin),
UpdateDRepCert(StakeCredential, Nullable<Anchor>),
UpdateDRepCert(DRepCredential, Nullable<Anchor>),
}

impl<'b, C> minicbor::decode::Decode<'b, C> for Certificate {
Expand Down Expand Up @@ -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)]
Expand Down

0 comments on commit 2d89f3d

Please sign in to comment.