Skip to content

Commit

Permalink
impl<'a> From<Vec<U256<'a>>> for Seq0255<'a, U256<'a>>
Browse files Browse the repository at this point in the history
required to unblock stratum-mining#985 (comment)
  • Loading branch information
plebhash committed Aug 9, 2024
1 parent 61b5cf0 commit 98b8a1b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion protocols/v2/binary-sv2/serde-sv2/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "serde_sv2"
version = "1.0.0"
version = "1.0.1"
authors = ["fi3 <[email protected]>"]
edition = "2018"
description = "Serlializer and Deserializer for Stratum V2 data format"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,15 @@ impl<'a> From<Vec<u32>> for Seq0255<'a, u32> {
}
}

impl<'a> From<Vec<U256<'a>>> for Seq0255<'a, U256<'a>> {
fn from(v: Vec<U256<'a>>) -> Self {
Seq0255 {
seq: None,
data: Some(v),
}
}
}

impl<'a> From<Seq0255<'a, u32>> for Vec<u32> {
fn from(v: Seq0255<u32>) -> Self {
if let Some(inner) = v.data {
Expand Down

0 comments on commit 98b8a1b

Please sign in to comment.