test: Log state on failure

This commit is contained in:
Franck Royer 2021-01-27 13:41:08 +11:00
parent 0b69573129
commit 49b8d19e41
No known key found for this signature in database
GPG Key ID: A82ED75A8DFC50A4

View File

@ -217,7 +217,7 @@ impl TestContext {
let lock_tx_id = if let BobState::XmrRedeemed { tx_lock_id } = state {
tx_lock_id
} else {
panic!("Bob in unexpected state");
panic!("Bob in not in xmr redeemed state: {:?}", state);
};
let lock_tx_bitcoin_fee = self
@ -250,7 +250,7 @@ impl TestContext {
let lock_tx_id = if let BobState::BtcRefunded(state4) = state {
state4.tx_lock_id()
} else {
panic!("Bob in unexpected state");
panic!("Bob in not in btc refunded state: {:?}", state);
};
let lock_tx_bitcoin_fee = self
.bob_bitcoin_wallet
@ -282,7 +282,7 @@ impl TestContext {
let lock_tx_id = if let BobState::BtcPunished { tx_lock_id } = state {
tx_lock_id
} else {
panic!("Bob in unexpected state");
panic!("Bob in not in btc punished state: {:?}", state);
};
let lock_tx_bitcoin_fee = self