From 98b8a1b4e14c065dbe5830e5c15b87e73c211085 Mon Sep 17 00:00:00 2001 From: plebhash Date: Thu, 8 Aug 2024 21:54:55 -0300 Subject: [PATCH] impl<'a> From>> for Seq0255<'a, U256<'a>> required to unblock https://github.com/stratum-mining/stratum/pull/985#issuecomment-2234328927 --- protocols/v2/binary-sv2/serde-sv2/Cargo.toml | 2 +- .../serde-sv2/src/primitives/sequences/seq0255.rs | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/protocols/v2/binary-sv2/serde-sv2/Cargo.toml b/protocols/v2/binary-sv2/serde-sv2/Cargo.toml index 5e01eb2d3c..fa313313f3 100644 --- a/protocols/v2/binary-sv2/serde-sv2/Cargo.toml +++ b/protocols/v2/binary-sv2/serde-sv2/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "serde_sv2" -version = "1.0.0" +version = "1.0.1" authors = ["fi3 "] edition = "2018" description = "Serlializer and Deserializer for Stratum V2 data format" diff --git a/protocols/v2/binary-sv2/serde-sv2/src/primitives/sequences/seq0255.rs b/protocols/v2/binary-sv2/serde-sv2/src/primitives/sequences/seq0255.rs index 2f01bce3ce..331edb34ed 100644 --- a/protocols/v2/binary-sv2/serde-sv2/src/primitives/sequences/seq0255.rs +++ b/protocols/v2/binary-sv2/serde-sv2/src/primitives/sequences/seq0255.rs @@ -259,6 +259,15 @@ impl<'a> From> for Seq0255<'a, u32> { } } +impl<'a> From>> for Seq0255<'a, U256<'a>> { + fn from(v: Vec>) -> Self { + Seq0255 { + seq: None, + data: Some(v), + } + } +} + impl<'a> From> for Vec { fn from(v: Seq0255) -> Self { if let Some(inner) = v.data {