From b0a5cdc47045792f845b0b5cf9aeac0063bfebae Mon Sep 17 00:00:00 2001 From: Santiago Carmuega Date: Sat, 27 Nov 2021 15:37:04 -0300 Subject: [PATCH] Add reference to Alonzo cddl source --- pallas-alonzo/src/lib.rs | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/pallas-alonzo/src/lib.rs b/pallas-alonzo/src/lib.rs index 89ae6a5..7a2c97a 100644 --- a/pallas-alonzo/src/lib.rs +++ b/pallas-alonzo/src/lib.rs @@ -1,3 +1,7 @@ +//! Ledger primitives and cbor codec for the Alonzo era +//! +//! Handcrafted, idiomatic rust artifacts based on based on the [Alonzo CDDL](https://github.com/input-output-hk/cardano-ledger/blob/master/eras/alonzo/test-suite/cddl-files/alonzo.cddl) file in IOHK repo. + use log::{log_enabled, warn}; use minicbor::{bytes::ByteVec, data::Tag, Decode, Encode}; use minicbor_derive::{Decode, Encode}; @@ -378,8 +382,10 @@ impl minicbor::encode::Encode for Certificate { #[derive(Encode, Decode, Debug, PartialEq, Eq, PartialOrd, Ord)] #[cbor(index_only)] pub enum NetworkId { - #[n(0)] One, - #[n(1)] Two, + #[n(0)] + One, + #[n(1)] + Two, } #[derive(Encode, Decode, Debug, PartialEq)] @@ -576,8 +582,10 @@ where #[derive(Encode, Decode, Debug, PartialEq)] pub struct ExUnits { - #[n(0)] mem: u32, - #[n(1)] steps: u32, + #[n(0)] + mem: u32, + #[n(1)] + steps: u32, } #[derive(Encode, Decode, Debug, PartialEq)]