Skip to content

Commit

Permalink
fix: use u64 instead of i64 for unit interval and rational numerator (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
jmhrpr authored and scarmuega committed Aug 24, 2023
1 parent a3977d9 commit b153e94
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pallas-primitives/src/alonzo/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ pub type Scripthash = Hash<28>;

#[derive(Serialize, Deserialize, Debug, PartialEq, Eq, Clone)]
pub struct RationalNumber {
pub numerator: i64,
pub numerator: u64,
pub denominator: u64,
}

Expand Down
2 changes: 2 additions & 0 deletions pallas-primitives/src/babbage/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -762,6 +762,8 @@ mod tests {
include_str!("../../../test_data/babbage8.block"),
// block with inline datum that fails hashes
include_str!("../../../test_data/babbage9.block"),
// block with pool margin numerator greater than i64::MAX
include_str!("../../../test_data/babbage10.block"),
];

for (idx, block_str) in test_blocks.iter().enumerate() {
Expand Down
1 change: 1 addition & 0 deletions test_data/babbage10.block
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
820685828a1a000f66271a015f029658207105cb0f1936464a3e2cc7dfea06b2a34b16c2bf866d6214d98eacf2e7834ca5582023bb0a21009d999bb9f4a5d3b4eca6a391bf112ae62e543d88e88b9163c5ccde58202051a46c1fd4ee008def6ae8573b5fccd17b6204675e91a0cadd6e8bc44c4bb58258405a5a62fb3b19145b4c8817d48e5283fe9f3c0948242fdc111b36d99b756adc32fab6b144a0671edbb9720bad6903a680c98ce60b3a183e146e62afaad6b568c25850240a438d9fbf6710382bdc90578a55744f2fd8974f656e8e708aee6a9e4e438f8827449e9c465222707e3325afa0f005ad91a6bf1ef1d4bfa7340a081af8204f4d7e27fa0940689dc995f65e042b980d1902d6582002ad7e80c64b1b0312c70195c38ed02e1d3e6c07925fc5f08df1afda3a901a58845820468b68fb6712da4a5d19d264ab1d1dcf07b2171c5df8b3f1a14567584e02395b0318a15840be790b8eb5ae92168e1a9fdb82c1c104b6c6acd2bc47050ca67f28e16b704673de31ea3dad57afb412134f6a29294804e1538a162b3015fb309c1e8db8cc500e8208005901c04afef0a36e5edc941fa168ec3f23fbb5023aafc74d4bd7c89cf99bd92c5e937e6dc6f5fcaea377a53e9eca0c77dab52c5edb327cae8a2b900a6d483b8ac5260ebb041e2250e5e608683c5766021ca46d10df19d91add6e1653f72a924f7ef9a79e0ad87ac0ac0e0e692601cd075c21ac5d4f69393b8615b17066865add8bc242cad8ef14d9a8595b5a70f1fa0d202909d27719dc6b3f9568440b19a20c07bea477f31b6fa8b8d629fef779d2d1848cd17257a6245827d8e0644aad9660da2ebc186871213a75c496a39b00137fbf59852099eb271059a448a433494a0faa3d06f2ac0f6f29c919a8f1ba0eb8ac13f7a0491ccfcda7e44a004a63ab55d56a781d87e8dd4dac9b514e635d19eed2aafacfe7e12837a2348136156dcd6230d379e5fe63471cbe1b1c94a74161fa2807a6489788b793bb611f07d56ee73a56cc8b38f23ab4393523a86e87d9d09c89e29875c4f6b142cb52b0daa0e06e9f28c9b0c19d5bdcf7853fec6c716c42073b446d6e782809ad02e8b0a00ab9023af4a33aa530aabc925854d16f229668f527c74a599a8c70a24ba07b0bed92143634bd5d3beb06870ece0641949c4e40c044154acbc932c47ad9d233b7549c35cf6a80f94981a40081825820e7d032f20962abac9925bb02867b417ffee45baa64462a5a2a6c96e16138ded1000181a200583900f3cf7cfcefaf3c6b33436b4fff86d00b3be42036760d43da75dac7e2b04dff59ee3b964a7d9f4fda04d98ef43de3abc832112cc37a35d138011b0000000235f51991021a0002e81d04818a03581c129a187287eb6c65e57af2a1ac5750113ecc1a1e658b960358fcaa595820cf027ebfbfec5c3f964b05341519180003e2ed092829a402f775efec666d78e11b80000000000000011a1443fd00d81e821b80000000000000011b8ac7230489e80000581de0b04dff59ee3b964a7d9f4fda04d98ef43de3abc832112cc37a35d13881581cb04dff59ee3b964a7d9f4fda04d98ef43de3abc832112cc37a35d13883840019138b4405a14bd4f6840018644464646464f6840018c844c8c8c8c8f682784068747470733a2f2f7261772e67697468756275736572636f6e74656e742e636f6d2f7374616b656c6f76656c6163652f7075622f6d61696e2f73322e6a736f6e5820b3ac275b0568c3b7d63f889f896086fe4cb61d0f156cbfa18b5466a8480e012a81a10083825820d0a4c6167a201d00dfb5584ea5331dc0612fdb9897abe8c3ec0c9383f7f489585840040522fe74259e129ec43252c49cffdd2796a74e1634474d39949e8aa8c54d86d9bd6e42e374a814176b30fe17c0b176b76df289a3684e12e927e4c9f6cc860782582051b0dfef64dab62ad8a74436b26078512883b2dbf9c8dd8a62971c94bc13eb685840e063d1577250fe427329f7a0097eb9fe14dd2a4522e3e3bdc18b5afc3b787611b285167ca7a60227bb9cae87ecf572260444945c70163edac05dcc0bfb898106825820d307b3b0197efbdada38ec057e54b8d207514629d69e81a3e99dd55e3aed87cc5840c15221cc84b9548b7bb7a95199119294010caf7da4af684dc825e6d614748371b5bceb5a9f3a1281d10efbbe8a4d57cb13843b9c3a3781455f0aee57e3f5f30ba080

0 comments on commit b153e94

Please sign in to comment.