From f09047482e7e457946c8d5aa7ac4d226d429ba5c Mon Sep 17 00:00:00 2001 From: Santiago Carmuega Date: Wed, 23 Feb 2022 22:41:58 -0300 Subject: [PATCH] Release 0.5.0-alpha.5 pallas@0.5.0-alpha.5 pallas-crypto@0.5.0-alpha.5 pallas-miniprotocols@0.5.0-alpha.5 pallas-multiplexer@0.5.0-alpha.5 pallas-primitives@0.5.0-alpha.5 Generated by cargo-workspaces --- pallas-crypto/Cargo.toml | 2 +- pallas-miniprotocols/Cargo.toml | 2 +- pallas-miniprotocols/src/common.rs | 9 +++++++++ pallas-multiplexer/Cargo.toml | 2 +- pallas-primitives/Cargo.toml | 2 +- pallas/Cargo.toml | 2 +- 6 files changed, 14 insertions(+), 5 deletions(-) diff --git a/pallas-crypto/Cargo.toml b/pallas-crypto/Cargo.toml index 6a14934..ae84f01 100644 --- a/pallas-crypto/Cargo.toml +++ b/pallas-crypto/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "pallas-crypto" description = "Cryptographic primitives for Cardano" -version = "0.5.0-alpha.4" +version = "0.5.0-alpha.5" edition = "2021" repository = "https://github.com/txpipe/pallas" homepage = "https://github.com/txpipe/pallas" diff --git a/pallas-miniprotocols/Cargo.toml b/pallas-miniprotocols/Cargo.toml index 134a709..043e1dd 100644 --- a/pallas-miniprotocols/Cargo.toml +++ b/pallas-miniprotocols/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "pallas-miniprotocols" description = "Implementation of the Ouroboros network mini-protocols state-machines" -version = "0.5.0-alpha.4" +version = "0.5.0-alpha.5" edition = "2021" repository = "https://github.com/txpipe/pallas" homepage = "https://github.com/txpipe/pallas" diff --git a/pallas-miniprotocols/src/common.rs b/pallas-miniprotocols/src/common.rs index 382e8af..39c5964 100644 --- a/pallas-miniprotocols/src/common.rs +++ b/pallas-miniprotocols/src/common.rs @@ -13,6 +13,15 @@ pub enum Point { Specific(u64, Vec), } +impl Point { + pub fn slot_or_default(&self) -> u64 { + match self { + Point::Origin => 0, + Point::Specific(slot, _) => *slot, + } + } +} + impl Debug for Point { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { diff --git a/pallas-multiplexer/Cargo.toml b/pallas-multiplexer/Cargo.toml index fe6faa6..8b4a637 100644 --- a/pallas-multiplexer/Cargo.toml +++ b/pallas-multiplexer/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "pallas-multiplexer" description = "Multithreaded Ouroboros multiplexer implementation using mpsc channels" -version = "0.5.0-alpha.4" +version = "0.5.0-alpha.5" edition = "2021" repository = "https://github.com/txpipe/pallas" homepage = "https://github.com/txpipe/pallas" diff --git a/pallas-primitives/Cargo.toml b/pallas-primitives/Cargo.toml index 56a0580..2c3dca1 100644 --- a/pallas-primitives/Cargo.toml +++ b/pallas-primitives/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "pallas-primitives" description = "Ledger primitives and cbor codec for the different Cardano eras" -version = "0.5.0-alpha.4" +version = "0.5.0-alpha.5" edition = "2021" repository = "https://github.com/txpipe/pallas" homepage = "https://github.com/txpipe/pallas" diff --git a/pallas/Cargo.toml b/pallas/Cargo.toml index 8c2462a..849500a 100644 --- a/pallas/Cargo.toml +++ b/pallas/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "pallas" description = "Rust-native building blocks for the Cardano blockchain ecosystem." -version = "0.5.0-alpha.4" +version = "0.5.0-alpha.5" edition = "2021" repository = "https://github.com/txpipe/pallas" homepage = "https://github.com/txpipe/pallas"