fix(primitives): patch remaining Conway issues (#505)

* Expose private struct fields for ExUnitPrices.
* Fix UpdateDRepCert variant argument.
This commit is contained in:
Matthias Benkort 2024-08-25 16:48:54 +02:00 committed by GitHub
parent 7aa510389b
commit 2d89f3da54
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 5 deletions

View file

@ -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)]

View file

@ -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 {
@ -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)]