Skip to content

Commit

Permalink
do not update inflight txs set if already received (#280)
Browse files Browse the repository at this point in the history
  • Loading branch information
boqiu authored Jul 1, 2019
1 parent d8faf34 commit 891af59
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/src/sync/request_manager/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -373,13 +373,13 @@ impl RequestManager {
let mut indices = Vec::new();

for (idx, tx_id) in received_tx_ids.iter().enumerate() {
if !inflight_transactions.insert(*tx_id) {
// Already being requested
if received_transactions.contains_txid(tx_id) {
// Already received
continue;
}

if received_transactions.contains_txid(tx_id) {
// Already received
if !inflight_transactions.insert(*tx_id) {
// Already being requested
continue;
}

Expand Down

0 comments on commit 891af59

Please sign in to comment.