Do not introduced State6

This commit is contained in:
Franck Royer 2021-01-18 15:26:06 +11:00
parent 8615aaed6e
commit 9a823dca4c
No known key found for this signature in database
GPG key ID: A82ED75A8DFC50A4
4 changed files with 30 additions and 41 deletions

View file

@ -363,8 +363,8 @@ impl BobHarness {
}
pub async fn assert_redeemed(&self, state: BobState) {
let lock_tx_id = if let BobState::XmrRedeemed(state6) = state {
state6.tx_lock_id()
let lock_tx_id = if let BobState::XmrRedeemed { tx_lock_id } = state {
tx_lock_id
} else {
panic!("Bob in unexpected state");
};
@ -423,8 +423,8 @@ impl BobHarness {
}
pub async fn assert_punished(&self, state: BobState) {
let lock_tx_id = if let BobState::BtcPunished(state6) = state {
state6.tx_lock_id()
let lock_tx_id = if let BobState::BtcPunished { tx_lock_id } = state {
tx_lock_id
} else {
panic!("Bob in unexpected state");
};