Skip to content

Commit

Permalink
release: v5.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kilpatty committed Mar 7, 2023
1 parent 554d6cf commit 86bcedc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion server/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "stratum-server"
version = "5.1.0"
version = "5.2.0"
authors = ["Sean Kilgarriff sean@urkel.com"]
rust-version = "1.65"
edition = "2021"
Expand Down
8 changes: 1 addition & 7 deletions server/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,6 @@ mod tcp;
mod types;
mod utils;

// #[cfg(feature = "upstream")]
// mod upstream;

// #[cfg(feature = "upstream")]
// use crate::config::UpstreamConfig;

#[cfg(feature = "api")]
mod api;

Expand All @@ -53,7 +47,7 @@ pub use crate::{
server::StratumServer,
session::Session,
session_list::SessionList,
types::{ReadyIndicator, SessionID, EX_MAGIC_NUMBER, ID},
types::{Difficulty, ReadyIndicator, SessionID, EX_MAGIC_NUMBER, ID},
};

pub type Result<T> = std::result::Result<T, Error>;
3 changes: 3 additions & 0 deletions server/src/types/difficulty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,17 @@ const MAX_DIFF: u64 = 9_223_372_036_854_775_808;
pub struct Difficulty(u64);

impl Difficulty {
#[must_use]
pub fn zero() -> Self {
Difficulty(0)
}

#[must_use]
pub fn is_zero(self) -> bool {
self.0 == 0
}

#[must_use]
pub fn as_u64(self) -> u64 {
self.0
}
Expand Down

0 comments on commit 86bcedc

Please sign in to comment.