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

Commit

Permalink
update back-references more aggressively after answering from cache (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
rphmeier authored and debris committed Jan 17, 2018
1 parent 7aeb6c5 commit c7aed33
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ethcore/light/src/on_demand/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,14 @@ impl Pending {
match self.requests[idx].respond_local(cache) {
Some(response) => {
self.requests.supply_response_unchecked(&response);

// update header and back-references after each from-cache
// response to ensure that the requests are left in a consistent
// state and increase the likelihood of being able to answer
// the next request from cache.
self.update_header_refs(idx, &response);
self.fill_unanswered();

self.responses.push(response);
}
None => break,
Expand Down

0 comments on commit c7aed33

Please sign in to comment.