Implement Clone on states

This commit is contained in:
Tobin C. Harding 2020-10-22 09:18:57 +11:00
parent 2a07113074
commit 7dffe4cf5f

View File

@ -131,7 +131,7 @@ impl State {
} }
} }
#[derive(Debug, Deserialize, Serialize)] #[derive(Clone, Debug, Deserialize, Serialize)]
pub struct State0 { pub struct State0 {
a: bitcoin::SecretKey, a: bitcoin::SecretKey,
#[serde(with = "cross_curve_dleq_scalar")] #[serde(with = "cross_curve_dleq_scalar")]
@ -219,7 +219,7 @@ impl State0 {
} }
} }
#[derive(Debug, Deserialize, Serialize)] #[derive(Clone, Debug, Deserialize, Serialize)]
pub struct State1 { pub struct State1 {
a: bitcoin::SecretKey, a: bitcoin::SecretKey,
B: bitcoin::PublicKey, B: bitcoin::PublicKey,
@ -259,7 +259,7 @@ impl State1 {
} }
} }
#[derive(Debug, Deserialize, Serialize)] #[derive(Clone, Debug, Deserialize, Serialize)]
pub struct State2 { pub struct State2 {
a: bitcoin::SecretKey, a: bitcoin::SecretKey,
B: bitcoin::PublicKey, B: bitcoin::PublicKey,
@ -336,7 +336,7 @@ impl State2 {
} }
} }
#[derive(Debug, Deserialize, Serialize)] #[derive(Clone, Debug, Deserialize, Serialize)]
pub struct State3 { pub struct State3 {
pub a: bitcoin::SecretKey, pub a: bitcoin::SecretKey,
pub B: bitcoin::PublicKey, pub B: bitcoin::PublicKey,
@ -393,7 +393,7 @@ impl State3 {
} }
} }
#[derive(Debug, Deserialize, Serialize)] #[derive(Clone, Debug, Deserialize, Serialize)]
pub struct State4 { pub struct State4 {
a: bitcoin::SecretKey, a: bitcoin::SecretKey,
B: bitcoin::PublicKey, B: bitcoin::PublicKey,
@ -500,7 +500,7 @@ impl State4 {
} }
} }
#[derive(Debug, Deserialize, Serialize)] #[derive(Clone, Debug, Deserialize, Serialize)]
pub struct State5 { pub struct State5 {
a: bitcoin::SecretKey, a: bitcoin::SecretKey,
B: bitcoin::PublicKey, B: bitcoin::PublicKey,
@ -595,7 +595,7 @@ impl State5 {
} }
} }
#[derive(Debug, Deserialize, Serialize)] #[derive(Clone, Debug, Deserialize, Serialize)]
pub struct State6 { pub struct State6 {
a: bitcoin::SecretKey, a: bitcoin::SecretKey,
B: bitcoin::PublicKey, B: bitcoin::PublicKey,