perf(net): use qualified types for headers client future (#1115)

This commit is contained in:
Matthias Seitz
2023-02-01 13:12:48 +01:00
committed by GitHub
parent 0ea1360cd6
commit 28cb91c6b4
6 changed files with 29 additions and 26 deletions

View File

@ -168,14 +168,14 @@ impl Command {
let (_, response) = client.get_headers(request).await?.split();
if response.0.len() != 1 {
if response.len() != 1 {
eyre::bail!(
"Invalid number of headers received. Expected: 1. Received: {}",
response.0.len()
response.len()
)
}
let header = response.0.into_iter().next().unwrap().seal();
let header = response.into_iter().next().unwrap().seal();
let valid = match id {
BlockHashOrNumber::Hash(hash) => header.hash() == hash,