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 c0d72f3
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
4 changes: 2 additions & 2 deletions protocols/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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 c0d72f3

Please sign in to comment.