mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-06-08 15:12:43 -04:00
Preemptively box cancel tx to avoid size difference in enum
This commit is contained in:
parent
69363e43a3
commit
39a46baa2c
3 changed files with 6 additions and 3 deletions
|
@ -150,7 +150,7 @@ impl From<Alice> for AliceState {
|
||||||
|
|
||||||
AliceState::BtcCancelled {
|
AliceState::BtcCancelled {
|
||||||
state3: Box::new(state),
|
state3: Box::new(state),
|
||||||
tx_cancel,
|
tx_cancel: Box::new(tx_cancel),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Alice::BtcPunishable(state3) => {
|
Alice::BtcPunishable(state3) => {
|
||||||
|
|
|
@ -46,7 +46,7 @@ pub enum AliceState {
|
||||||
},
|
},
|
||||||
BtcRedeemed,
|
BtcRedeemed,
|
||||||
BtcCancelled {
|
BtcCancelled {
|
||||||
tx_cancel: TxCancel,
|
tx_cancel: Box<TxCancel>,
|
||||||
state3: Box<State3>,
|
state3: Box<State3>,
|
||||||
},
|
},
|
||||||
BtcRefunded {
|
BtcRefunded {
|
||||||
|
|
|
@ -305,7 +305,10 @@ async fn run_until_internal(
|
||||||
)
|
)
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
let state = AliceState::BtcCancelled { state3, tx_cancel };
|
let state = AliceState::BtcCancelled {
|
||||||
|
state3,
|
||||||
|
tx_cancel: Box::new(tx_cancel),
|
||||||
|
};
|
||||||
let db_state = (&state).into();
|
let db_state = (&state).into();
|
||||||
db.insert_latest_state(swap_id, database::Swap::Alice(db_state))
|
db.insert_latest_state(swap_id, database::Swap::Alice(db_state))
|
||||||
.await?;
|
.await?;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue