Skip to content

Commit

Permalink
Fix style
Browse files Browse the repository at this point in the history
  • Loading branch information
ochenane committed Jun 24, 2024
1 parent cee783c commit c712477
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion crates/node-core/src/node_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ impl NodeConfig {
}

/// Loads '`EnvKzgSettings::Default`'
pub fn kzg_settings(&self) -> eyre::Result<EnvKzgSettings> {
pub const fn kzg_settings(&self) -> eyre::Result<EnvKzgSettings> {
Ok(EnvKzgSettings::Default)
}

Expand Down
2 changes: 1 addition & 1 deletion crates/node/builder/src/builder/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ impl<Node: FullNodeTypes> BuilderContext<Node> {
}

/// Loads `EnvKzgSettings::Default`.
pub fn kzg_settings(&self) -> eyre::Result<EnvKzgSettings> {
pub const fn kzg_settings(&self) -> eyre::Result<EnvKzgSettings> {
Ok(EnvKzgSettings::Default)
}

Expand Down
4 changes: 3 additions & 1 deletion crates/primitives/benches/validate_blob_tx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ fn validate_blob_tx(
// for now we just use the default SubPoolLimit
group.bench_function(group_id, |b| {
b.iter_with_setup(setup, |(tx, blob_sidecar)| {
if let Err(err) = std::hint::black_box(tx.validate_blob(&blob_sidecar, kzg_settings.get())) {
if let Err(err) =
std::hint::black_box(tx.validate_blob(&blob_sidecar, kzg_settings.get()))
{
println!("Validation failed: {err:?}");
}
});
Expand Down
2 changes: 1 addition & 1 deletion crates/transaction-pool/src/validate/eth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ where
}
EthBlobTransactionSidecar::Present(blob) => {
// validate the blob
if let Err(err) = transaction.validate_blob(&blob, &self.kzg_settings.get()) {
if let Err(err) = transaction.validate_blob(&blob, self.kzg_settings.get()) {
return TransactionValidationOutcome::Invalid(
transaction,
InvalidPoolTransactionError::Eip4844(
Expand Down

0 comments on commit c712477

Please sign in to comment.