perf: allocate responses capacity (#618)

This commit is contained in:
Matthias Seitz
2022-12-26 20:38:00 +01:00
committed by GitHub
parent daa65e7f58
commit 410a1f9cfe

View File

@ -135,7 +135,7 @@ where
let mut bodies = bodies.into_iter();
let mut responses = vec![];
let mut responses = Vec::with_capacity(headers.len());
for header in headers.into_iter().cloned() {
// If the header has no txs / ommers, just push it and continue
if header.is_empty() {