mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
perf(net): use qualified types for headers client future (#1115)
This commit is contained in:
@ -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,
|
||||
|
||||
Reference in New Issue
Block a user