diff --git a/pallas-traverse/src/redeemers.rs b/pallas-traverse/src/redeemers.rs index 5601e773..0c565766 100644 --- a/pallas-traverse/src/redeemers.rs +++ b/pallas-traverse/src/redeemers.rs @@ -53,6 +53,18 @@ impl<'b> MultiEraRedeemer<'b> { } } + pub fn into_conway_deprecated(&self) -> Option { + match self { + Self::AlonzoCompatible(_) => None, + Self::Conway(x, y) => Some(conway::Redeemer { + tag: x.tag, + index: x.index, + data: y.data.clone(), + ex_units: y.ex_units, + }), + } + } + pub fn from_alonzo_compatible(redeemer: &'b alonzo::Redeemer) -> Self { Self::AlonzoCompatible(Box::new(Cow::Borrowed(redeemer))) } diff --git a/pallas-traverse/src/tx.rs b/pallas-traverse/src/tx.rs index 21b1db40..e0a34401 100644 --- a/pallas-traverse/src/tx.rs +++ b/pallas-traverse/src/tx.rs @@ -199,9 +199,9 @@ impl<'b> MultiEraTx<'b> { /// Return inputs as expected for processing /// - /// To process inputs we need a set (no duplicated) and lexicographical - /// order (hash#idx). This function will take the raw inputs and apply the - /// aforementioned cleanup changes. + /// To process inputs we need a set (no duplicates) and lexicographical + /// order (hash#idx). This function will take the raw inputs and apply a + /// sort following these requirements. pub fn inputs_sorted_set(&self) -> Vec { let mut raw = self.inputs(); raw.sort_by_key(|x| x.lexicographical_key()); diff --git a/pallas-traverse/src/update.rs b/pallas-traverse/src/update.rs index 0604d2a3..e9d72f1d 100644 --- a/pallas-traverse/src/update.rs +++ b/pallas-traverse/src/update.rs @@ -57,7 +57,7 @@ pub type DRepVotingThresholds = conway::DRepVotingThresholds; use crate::{Era, MultiEraUpdate}; impl<'b> MultiEraUpdate<'b> { - pub fn decode_for_era(era: Era, cbor: &'b [u8]) -> Result { + pub fn decode_for_era(era: Era, cbor: &[u8]) -> Result { match era { Era::Byron => { let (epoch, up) = minicbor::decode(cbor)?;