From b99e7c80cd26da913f617c5b0d5654d10ebe862e Mon Sep 17 00:00:00 2001 From: plebhash Date: Thu, 8 Aug 2024 22:17:28 -0300 Subject: [PATCH] import TryInto on template_distribution_sv2 requirement to unblock https://github.com/stratum-mining/stratum/pull/985#issuecomment-2234328927 --- protocols/Cargo.lock | 4 ++-- protocols/v2/roles-logic-sv2/Cargo.toml | 2 +- protocols/v2/subprotocols/template-distribution/Cargo.toml | 2 +- .../v2/subprotocols/template-distribution/src/new_template.rs | 2 ++ protocols/v2/sv2-ffi/Cargo.toml | 2 +- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/protocols/Cargo.lock b/protocols/Cargo.lock index fbe5ddceac..4fe987d078 100644 --- a/protocols/Cargo.lock +++ b/protocols/Cargo.lock @@ -716,7 +716,7 @@ dependencies = [ [[package]] name = "serde_sv2" -version = "1.0.0" +version = "1.0.1" dependencies = [ "buffer_sv2", "serde", @@ -796,7 +796,7 @@ dependencies = [ [[package]] name = "template_distribution_sv2" -version = "1.0.0" +version = "1.0.1" dependencies = [ "binary_sv2", "const_sv2", diff --git a/protocols/v2/roles-logic-sv2/Cargo.toml b/protocols/v2/roles-logic-sv2/Cargo.toml index 4254d6a1f5..1e20f03ba5 100644 --- a/protocols/v2/roles-logic-sv2/Cargo.toml +++ b/protocols/v2/roles-logic-sv2/Cargo.toml @@ -14,7 +14,7 @@ serde = { version = "1.0.89", features = ["derive", "alloc"], default-features = binary_sv2 = {version = "^1.0.0", path = "../../../protocols/v2/binary-sv2/binary-sv2", default-features = true } common_messages_sv2 = { path = "../../../protocols/v2/subprotocols/common-messages", version = "^1.0.0" } mining_sv2 = { path = "../../../protocols/v2/subprotocols/mining", version = "^1.0.0" } -template_distribution_sv2 = { path = "../../../protocols/v2/subprotocols/template-distribution", version = "^1.0.0" } +template_distribution_sv2 = { path = "../../../protocols/v2/subprotocols/template-distribution", version = "^1.0.1" } job_declaration_sv2 = { path = "../../../protocols/v2/subprotocols/job-declaration", version = "^1.0.0" } const_sv2 = { version = "^1.0.0", path = "../../../protocols/v2/const-sv2"} framing_sv2 = { version = "^1.1.0", path = "../../../protocols/v2/framing-sv2" } diff --git a/protocols/v2/subprotocols/template-distribution/Cargo.toml b/protocols/v2/subprotocols/template-distribution/Cargo.toml index 0b8a36a9ca..9aa2c17884 100644 --- a/protocols/v2/subprotocols/template-distribution/Cargo.toml +++ b/protocols/v2/subprotocols/template-distribution/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "template_distribution_sv2" -version = "1.0.0" +version = "1.0.1" authors = ["fi3 "] edition = "2018" description = "Sv2 template distribution subprotocol" diff --git a/protocols/v2/subprotocols/template-distribution/src/new_template.rs b/protocols/v2/subprotocols/template-distribution/src/new_template.rs index 67c5b12905..6c1f3b4357 100644 --- a/protocols/v2/subprotocols/template-distribution/src/new_template.rs +++ b/protocols/v2/subprotocols/template-distribution/src/new_template.rs @@ -7,6 +7,8 @@ use binary_sv2::Error; use binary_sv2::{Deserialize, Seq0255, Serialize, B0255, B064K, U256}; #[cfg(not(feature = "with_serde"))] use core::convert::TryInto; +#[cfg(all(feature = "with_serde", not(feature = "no_std")))] +use std::convert::TryInto; /// ## NewTemplate (Server -> Client) /// The primary template-providing function. Note that the coinbase_tx_outputs bytes will appear diff --git a/protocols/v2/sv2-ffi/Cargo.toml b/protocols/v2/sv2-ffi/Cargo.toml index 7930f58051..f8c2fe328b 100644 --- a/protocols/v2/sv2-ffi/Cargo.toml +++ b/protocols/v2/sv2-ffi/Cargo.toml @@ -15,7 +15,7 @@ codec_sv2 = { path = "../../../protocols/v2/codec-sv2", version = "^1.0.0" } const_sv2 = { path = "../../../protocols/v2/const-sv2", version = "^1.0.0" } binary_sv2 = { path = "../../../protocols/v2/binary-sv2/binary-sv2", version = "^1.0.0" } common_messages_sv2 = { path = "../../../protocols/v2/subprotocols/common-messages", version = "^1.0.0" } -template_distribution_sv2 = { path = "../../../protocols/v2/subprotocols/template-distribution", version = "^1.0.0" } +template_distribution_sv2 = { path = "../../../protocols/v2/subprotocols/template-distribution", version = "^1.0.1" } [dev-dependencies] quickcheck = "1.0.3"