mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2024-11-17 15:26:14 +00: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,
|
||||
} => Alice::EncSigLearned {
|
||||
state3: state3.as_ref().clone(),
|
||||
encrypted_signature: encrypted_signature.clone(),
|
||||
encrypted_signature: *encrypted_signature.clone(),
|
||||
},
|
||||
AliceState::BtcRedeemed => Alice::Done(AliceEndState::BtcRedeemed),
|
||||
AliceState::BtcCancelled { state3, .. } => Alice::BtcCancelled(state3.as_ref().clone()),
|
||||
@ -135,7 +135,7 @@ impl From<Alice> for AliceState {
|
||||
encrypted_signature,
|
||||
} => AliceState::EncSigLearned {
|
||||
state3: Box::new(state),
|
||||
encrypted_signature,
|
||||
encrypted_signature: Box::new(encrypted_signature),
|
||||
},
|
||||
Alice::CancelTimelockExpired(state3) => AliceState::CancelTimelockExpired {
|
||||
state3: Box::new(state3),
|
||||
|
@ -41,7 +41,7 @@ pub enum AliceState {
|
||||
state3: Box<State3>,
|
||||
},
|
||||
EncSigLearned {
|
||||
encrypted_signature: bitcoin::EncryptedSignature,
|
||||
encrypted_signature: Box<bitcoin::EncryptedSignature>,
|
||||
state3: Box<State3>,
|
||||
},
|
||||
BtcRedeemed,
|
||||
|
@ -202,7 +202,7 @@ async fn run_until_internal(
|
||||
Either::Left(_) => AliceState::CancelTimelockExpired { state3 },
|
||||
Either::Right((enc_sig, _)) => AliceState::EncSigLearned {
|
||||
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? {
|
||||
ExpiredTimelocks::None => {
|
||||
match build_bitcoin_redeem_transaction(
|
||||
encrypted_signature,
|
||||
*encrypted_signature,
|
||||
&state3.tx_lock,
|
||||
state3.a.clone(),
|
||||
state3.s_a,
|
||||
|
Loading…
Reference in New Issue
Block a user