Skip to content

Commit

Permalink
swapd: unfound bug
Browse files Browse the repository at this point in the history
treating as if the bug is on the pop unwrap, since the expect is checked

2022-07-17T13:13:23.6366705Z [2022-07-17T13:13:23Z DEBUG microservices::esb::controller] syncer<(Monero,Local)> -> swap<0x8478…a469>: syncer_event(TransactionConfirmations(TransactionConfirmations { id: TaskId(1
1), block: [178, 67, 8, 101, 245, 54, 2, 17, 91, 42, 117, 121, 49, 102, 1, 0, 114, 0, 189, 96, 58, 32, 16, 52, 132, 231, 198, 83, 77, 42, 7, 187], confirmations: Some(20), tx: [] }))
2022-07-17T13:13:23.6368099Z thread 'main' panicked at 'Checked above', src/swapd/runtime.rs:1239:30
2022-07-17T13:13:23.6368705Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
  • Loading branch information
zkao committed Jul 18, 2022
1 parent 1ca94b5 commit 1e12b84
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/swapd/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1226,7 +1226,12 @@ impl Runtime {
}) if self.state.b_buy_sig()
|| (self.state.a_refundsig() && self.state.a_xmr_locked())
&& *confirmations >= self.temporal_safety.sweep_monero_thr
&& self.pending_requests().contains_key(&source) =>
&& self.pending_requests().contains_key(&source)
&& self
.pending_requests()
.get(&source)
.map(|r| r.len() > 0)
.unwrap_or(false) =>
{
let PendingRequest {
source,
Expand Down

0 comments on commit 1e12b84

Please sign in to comment.