fix(light_fetch): avoid race with BlockNumber::Latest (#9665)
This commit is contained in:
parent
984493db30
commit
2d44b3ebea
@ -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())),
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user