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

fix(light_fetch): avoid race with BlockNumber::Latest #9665

Merged
merged 1 commit into from
Sep 29, 2018
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
3 changes: 2 additions & 1 deletion rpc/src/v1/helpers/light_fetch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,8 @@ impl LightFetch {
}).join(header_fut).and_then(move |((gas_known, tx), hdr)| {
// then request proved execution.
// TODO: get last-hashes from network.
let env_info = match client.env_info(id) {
let hash = hdr.hash();
let env_info = match client.env_info(BlockId::Hash(hash)) {
Some(env_info) => env_info,
_ => return Either::A(future::err(errors::unknown_block())),
};
Expand Down