Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove protocol deps from pool crate #1483

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions protocols/v2/codec-sv2/src/decoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,9 @@ impl<'a, T: Serialize + GetSize + Deserialize<'a>, B: IsBuffer + AeadBuffer> Wit

// Since the frame length is already validated during the handshake process, this
// operation is infallible
#[allow(clippy::useless_conversion)]
// Clippy is wrong here about the `src.into()` conversion. It is necessary to convert the
// `Vec<u8>` into a `B::Slice` to be able to call `from_bytes_unchecked`.
let frame = HandShakeFrame::from_bytes_unchecked(src.into());

frame.into()
Expand Down
2 changes: 1 addition & 1 deletion protocols/v2/roles-logic-sv2/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ nohash-hasher = "0.2.0"
siphasher = "1"
primitive-types = "0.13.1"
hex = {package = "hex-conservative", version = "*"}
codec_sv2 = { path = "../../../protocols/v2/codec-sv2", features = ["noise_sv2"] }

[dev-dependencies]
codec_sv2 = { path = "../../../protocols/v2/codec-sv2" }
quickcheck = "1.0.3"
quickcheck_macros = "1"
rand = "0.8.5"
Expand Down
10 changes: 10 additions & 0 deletions protocols/v2/roles-logic-sv2/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,13 @@ pub use errors::Error;
pub use job_declaration_sv2;
pub use mining_sv2;
pub use template_distribution_sv2;

pub use binary_sv2::{Error as BinaryError, B0255, B064K, U256};

pub use codec_sv2::{framing_sv2::Error as FramingError, Error as CodecError};

pub use codec_sv2::{noise_sv2::Error as NoiseError, HandshakeRole, Initiator, Responder};

pub use codec_sv2::{StandardEitherFrame, StandardSv2Frame};

pub use const_sv2::MESSAGE_TYPE_CHANNEL_ENDPOINT_CHANGED;
Loading
Loading