chore: more Vec over BytesMut (#7084)

This commit is contained in:
Matthias Seitz
2024-03-11 13:50:50 +01:00
committed by GitHub
parent 72d6e953ae
commit 81291ff0fb
14 changed files with 33 additions and 40 deletions

View File

@ -19,7 +19,6 @@ use reth_payload_builder::{
PayloadJobGenerator,
};
use reth_primitives::{
bytes::BytesMut,
constants::{EMPTY_WITHDRAWALS, ETHEREUM_BLOCK_GAS_LIMIT, RETH_CLIENT_VERSION, SLOT_DURATION},
proofs, BlockNumberOrTag, Bytes, ChainSpec, SealedBlock, Withdrawals, B256, U256,
};
@ -301,10 +300,10 @@ impl BasicPayloadJobGeneratorConfig {
impl Default for BasicPayloadJobGeneratorConfig {
fn default() -> Self {
let mut extradata = BytesMut::new();
let mut extradata = Vec::with_capacity(RETH_CLIENT_VERSION.as_bytes().len() + 1);
RETH_CLIENT_VERSION.as_bytes().encode(&mut extradata);
Self {
extradata: extradata.freeze().into(),
extradata: extradata.into(),
max_gas_limit: ETHEREUM_BLOCK_GAS_LIMIT,
interval: Duration::from_secs(1),
// 12s slot time