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

Commit bedbff5

Browse files
author
Boqin Qin
authored
ethcore/private-tcx: fix deadlock caused by conflicting lock order (#11764)
1 parent f37bce6 commit bedbff5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ethcore/private-tx/src/state_store.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,11 @@ impl PrivateStateStorage {
9090
request_hashes: request_hashes.clone(),
9191
state: RequestState::Syncing,
9292
};
93+
let mut hashes = self.syncing_hashes.write();
9394
let mut requests = self.requests.write();
9495
requests.push(request);
9596
let mut new_hashes = Vec::new();
9697
for hash in request_hashes {
97-
let mut hashes = self.syncing_hashes.write();
9898
if hashes.insert(hash, Instant::now() + Duration::from_millis(MAX_REQUEST_SESSION_DURATION)).is_none() {
9999
new_hashes.push(hash);
100100
}

0 commit comments

Comments
 (0)