Remove unnecessary serde implementations

This commit is contained in:
Thomas Eizinger 2021-03-24 16:31:49 +11:00
parent c539465925
commit 7f5715e147
No known key found for this signature in database
GPG Key ID: 651AC83A6C6C8B96
2 changed files with 5 additions and 9 deletions

View File

@ -74,7 +74,7 @@ impl fmt::Display for AliceState {
}
}
#[derive(Clone, Debug, Deserialize, Serialize, PartialEq)]
#[derive(Clone, Debug, PartialEq)]
pub struct State0 {
pub a: bitcoin::SecretKey,
pub s_a: monero::Scalar,
@ -82,7 +82,6 @@ pub struct State0 {
pub(crate) S_a_monero: monero::PublicKey,
pub(crate) S_a_bitcoin: bitcoin::PublicKey,
pub dleq_proof_s_a: CrossCurveDLEQProof,
#[serde(with = "::bitcoin::util::amount::serde::as_sat")]
pub btc: bitcoin::Amount,
pub xmr: monero::Amount,
pub cancel_timelock: CancelTimelock,
@ -168,7 +167,7 @@ impl State0 {
}
}
#[derive(Clone, Debug, Deserialize, Serialize)]
#[derive(Clone, Debug)]
pub struct State1 {
a: bitcoin::SecretKey,
B: bitcoin::PublicKey,
@ -180,7 +179,6 @@ pub struct State1 {
v: monero::PrivateViewKey,
v_a: monero::PrivateViewKey,
dleq_proof_s_a: CrossCurveDLEQProof,
#[serde(with = "::bitcoin::util::amount::serde::as_sat")]
btc: bitcoin::Amount,
xmr: monero::Amount,
cancel_timelock: CancelTimelock,
@ -223,7 +221,7 @@ impl State1 {
}
}
#[derive(Clone, Debug, Deserialize, Serialize)]
#[derive(Clone, Debug)]
pub struct State2 {
a: bitcoin::SecretKey,
B: bitcoin::PublicKey,
@ -231,7 +229,6 @@ pub struct State2 {
S_b_monero: monero::PublicKey,
S_b_bitcoin: bitcoin::PublicKey,
v: monero::PrivateViewKey,
#[serde(with = "::bitcoin::util::amount::serde::as_sat")]
btc: bitcoin::Amount,
xmr: monero::Amount,
cancel_timelock: CancelTimelock,

View File

@ -69,7 +69,7 @@ impl fmt::Display for BobState {
}
}
#[derive(Clone, Debug, Deserialize, Serialize, PartialEq)]
#[derive(Clone, Debug, PartialEq)]
pub struct State0 {
b: bitcoin::SecretKey,
s_b: monero::Scalar,
@ -77,7 +77,6 @@ pub struct State0 {
S_b_bitcoin: bitcoin::PublicKey,
v_b: monero::PrivateViewKey,
dleq_proof_s_b: CrossCurveDLEQProof,
#[serde(with = "::bitcoin::util::amount::serde::as_sat")]
btc: bitcoin::Amount,
xmr: monero::Amount,
cancel_timelock: CancelTimelock,
@ -170,7 +169,7 @@ impl State0 {
}
}
#[derive(Debug, Deserialize, Serialize)]
#[derive(Debug)]
pub struct State1 {
A: bitcoin::PublicKey,
b: bitcoin::SecretKey,