From 509db060806f3f2039cfd2e84a8624c45801d8e0 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Thu, 7 Apr 2022 12:09:32 +0200 Subject: [PATCH] chore: expose some helpers (#1118) --- ethers-core/src/types/block.rs | 2 +- ethers-core/src/types/signature.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ethers-core/src/types/block.rs b/ethers-core/src/types/block.rs index 72577900..c738ac99 100644 --- a/ethers-core/src/types/block.rs +++ b/ethers-core/src/types/block.rs @@ -210,7 +210,7 @@ impl Serialize for BlockId { } /// A block Number (or tag - "latest", "earliest", "pending") -#[derive(Copy, Clone, Debug, PartialEq)] +#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)] pub enum BlockNumber { /// Latest block Latest, diff --git a/ethers-core/src/types/signature.rs b/ethers-core/src/types/signature.rs index e322a987..956695c1 100644 --- a/ethers-core/src/types/signature.rs +++ b/ethers-core/src/types/signature.rs @@ -131,7 +131,7 @@ impl Signature { } /// Retrieve the recovery ID. - fn recovery_id(&self) -> Result { + pub fn recovery_id(&self) -> Result { let standard_v = normalize_recovery_id(self.v); Ok(RecoveryId::new(standard_v)?) }