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

ethcore/private-tcx: fix deadlock caused by conflicting lock order #11764

Merged
merged 1 commit into from
Jun 18, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ethcore/private-tx/src/state_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,11 @@ impl PrivateStateStorage {
request_hashes: request_hashes.clone(),
state: RequestState::Syncing,
};
let mut hashes = self.syncing_hashes.write();
let mut requests = self.requests.write();
requests.push(request);
let mut new_hashes = Vec::new();
for hash in request_hashes {
let mut hashes = self.syncing_hashes.write();
if hashes.insert(hash, Instant::now() + Duration::from_millis(MAX_REQUEST_SESSION_DURATION)).is_none() {
new_hashes.push(hash);
}
Expand Down