Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Fixing possible race in transaction queue #735

Merged
merged 1 commit into from
Mar 15, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 2 additions & 3 deletions miner/src/transaction_queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -516,11 +516,10 @@ impl TransactionQueue {
return;
}

let base_nonce = fetch_nonce(&address);
Self::replace_transaction(tx, base_nonce, &mut self.current, &mut self.by_hash);
Self::replace_transaction(tx, state_nonce, &mut self.current, &mut self.by_hash);
self.last_nonces.insert(address, nonce);
// But maybe there are some more items waiting in future?
self.move_matching_future_to_current(address, nonce + U256::one(), base_nonce);
self.move_matching_future_to_current(address, nonce + U256::one(), state_nonce);
self.current.enforce_limit(&mut self.by_hash);
}

Expand Down