mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-02-26 09:31:18 -05:00
Preemptively box encrypted signature to avoid size difference in enum
This commit is contained in:
parent
fd084b764d
commit
69363e43a3
@ -76,7 +76,7 @@ impl From<&AliceState> for Alice {
|
|||||||
encrypted_signature,
|
encrypted_signature,
|
||||||
} => Alice::EncSigLearned {
|
} => Alice::EncSigLearned {
|
||||||
state3: state3.as_ref().clone(),
|
state3: state3.as_ref().clone(),
|
||||||
encrypted_signature: encrypted_signature.clone(),
|
encrypted_signature: *encrypted_signature.clone(),
|
||||||
},
|
},
|
||||||
AliceState::BtcRedeemed => Alice::Done(AliceEndState::BtcRedeemed),
|
AliceState::BtcRedeemed => Alice::Done(AliceEndState::BtcRedeemed),
|
||||||
AliceState::BtcCancelled { state3, .. } => Alice::BtcCancelled(state3.as_ref().clone()),
|
AliceState::BtcCancelled { state3, .. } => Alice::BtcCancelled(state3.as_ref().clone()),
|
||||||
@ -135,7 +135,7 @@ impl From<Alice> for AliceState {
|
|||||||
encrypted_signature,
|
encrypted_signature,
|
||||||
} => AliceState::EncSigLearned {
|
} => AliceState::EncSigLearned {
|
||||||
state3: Box::new(state),
|
state3: Box::new(state),
|
||||||
encrypted_signature,
|
encrypted_signature: Box::new(encrypted_signature),
|
||||||
},
|
},
|
||||||
Alice::CancelTimelockExpired(state3) => AliceState::CancelTimelockExpired {
|
Alice::CancelTimelockExpired(state3) => AliceState::CancelTimelockExpired {
|
||||||
state3: Box::new(state3),
|
state3: Box::new(state3),
|
||||||
|
@ -41,7 +41,7 @@ pub enum AliceState {
|
|||||||
state3: Box<State3>,
|
state3: Box<State3>,
|
||||||
},
|
},
|
||||||
EncSigLearned {
|
EncSigLearned {
|
||||||
encrypted_signature: bitcoin::EncryptedSignature,
|
encrypted_signature: Box<bitcoin::EncryptedSignature>,
|
||||||
state3: Box<State3>,
|
state3: Box<State3>,
|
||||||
},
|
},
|
||||||
BtcRedeemed,
|
BtcRedeemed,
|
||||||
|
@ -202,7 +202,7 @@ async fn run_until_internal(
|
|||||||
Either::Left(_) => AliceState::CancelTimelockExpired { state3 },
|
Either::Left(_) => AliceState::CancelTimelockExpired { state3 },
|
||||||
Either::Right((enc_sig, _)) => AliceState::EncSigLearned {
|
Either::Right((enc_sig, _)) => AliceState::EncSigLearned {
|
||||||
state3,
|
state3,
|
||||||
encrypted_signature: enc_sig?,
|
encrypted_signature: Box::new(enc_sig?),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -231,7 +231,7 @@ async fn run_until_internal(
|
|||||||
let state = match state3.expired_timelocks(bitcoin_wallet.as_ref()).await? {
|
let state = match state3.expired_timelocks(bitcoin_wallet.as_ref()).await? {
|
||||||
ExpiredTimelocks::None => {
|
ExpiredTimelocks::None => {
|
||||||
match build_bitcoin_redeem_transaction(
|
match build_bitcoin_redeem_transaction(
|
||||||
encrypted_signature,
|
*encrypted_signature,
|
||||||
&state3.tx_lock,
|
&state3.tx_lock,
|
||||||
state3.a.clone(),
|
state3.a.clone(),
|
||||||
state3.s_a,
|
state3.s_a,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user