Skip to content

Commit

Permalink
Merge branch 'sander/fix/master-dont-resume-cancelled-requests' into …
Browse files Browse the repository at this point in the history
…'master'

fix(backport): don't try to execute cancelled requests on startup

See merge request interlay/polkabtc-clients!168
  • Loading branch information
nud3l committed Jan 15, 2021
2 parents c31e447 + 848908e commit 4645e89
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions vault/src/execution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,13 +190,13 @@ pub async fn execute_open_requests<B: BitcoinCoreApi + Send + Sync + 'static>(
.get_vault_redeem_requests(vault_id.clone())
.await?
.into_iter()
.filter(|(_, request)| !request.completed)
.filter(|(_, request)| !request.completed && !request.cancelled)
.map(|(hash, request)| Request::from_redeem_request(hash, request));
let open_replaces = provider
.get_old_vault_replace_requests(vault_id)
.await?
.into_iter()
.filter(|(_, request)| !request.completed)
.filter(|(_, request)| !request.completed && !request.cancelled)
.map(|(hash, request)| Request::from_replace_request(hash, request));

// Place all redeems&replaces into a hashmap, indexed by their redeemid/replaceid
Expand Down

0 comments on commit 4645e89

Please sign in to comment.