mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
fmt: run nightly-2023-10-15 and remove semicolons (#6035)
This commit is contained in:
@ -43,7 +43,7 @@ impl<'a> BlockExecutor for EVMProcessor<'a> {
|
||||
block.timestamp,
|
||||
) {
|
||||
debug!(target: "evm", ?error, ?receipts, "receipts verification failed");
|
||||
return Err(error);
|
||||
return Err(error)
|
||||
};
|
||||
self.stats.receipt_root_duration += time.elapsed();
|
||||
}
|
||||
@ -60,7 +60,7 @@ impl<'a> BlockExecutor for EVMProcessor<'a> {
|
||||
|
||||
// perf: do not execute empty blocks
|
||||
if block.body.is_empty() {
|
||||
return Ok((Vec::new(), 0));
|
||||
return Ok((Vec::new(), 0))
|
||||
}
|
||||
|
||||
let is_regolith =
|
||||
@ -91,7 +91,7 @@ impl<'a> BlockExecutor for EVMProcessor<'a> {
|
||||
transaction_gas_limit: transaction.gas_limit(),
|
||||
block_available_gas,
|
||||
}
|
||||
.into());
|
||||
.into())
|
||||
}
|
||||
|
||||
// Cache the depositor account prior to the state transition for the deposit nonce.
|
||||
|
||||
@ -277,7 +277,7 @@ impl<'a> EVMProcessor<'a> {
|
||||
gas: GotExpected { got: cumulative_gas_used, expected: block.gas_used },
|
||||
gas_spent_by_tx: receipts.gas_spent_by_tx()?,
|
||||
}
|
||||
.into());
|
||||
.into())
|
||||
}
|
||||
let time = Instant::now();
|
||||
self.apply_post_execution_state_change(block, total_difficulty)?;
|
||||
@ -336,7 +336,7 @@ impl<'a> EVMProcessor<'a> {
|
||||
self.prune_modes.receipts.map_or(false, |mode| mode.should_prune(block_number, tip))
|
||||
{
|
||||
receipts.clear();
|
||||
return Ok(());
|
||||
return Ok(())
|
||||
}
|
||||
|
||||
// All receipts from the last 128 blocks are required for blockchain tree, even with
|
||||
@ -344,7 +344,7 @@ impl<'a> EVMProcessor<'a> {
|
||||
let prunable_receipts =
|
||||
PruneMode::Distance(MINIMUM_PRUNING_DISTANCE).should_prune(block_number, tip);
|
||||
if !prunable_receipts {
|
||||
return Ok(());
|
||||
return Ok(())
|
||||
}
|
||||
|
||||
let contract_log_pruner = self.prune_modes.receipts_log_filter.group_by_block(tip, None)?;
|
||||
@ -402,7 +402,7 @@ impl<'a> BlockExecutor for EVMProcessor<'a> {
|
||||
verify_receipt(block.header.receipts_root, block.header.logs_bloom, receipts.iter())
|
||||
{
|
||||
debug!(target: "evm", ?error, ?receipts, "receipts verification failed");
|
||||
return Err(error);
|
||||
return Err(error)
|
||||
};
|
||||
self.stats.receipt_root_duration += time.elapsed();
|
||||
}
|
||||
@ -419,7 +419,7 @@ impl<'a> BlockExecutor for EVMProcessor<'a> {
|
||||
|
||||
// perf: do not execute empty blocks
|
||||
if block.body.is_empty() {
|
||||
return Ok((Vec::new(), 0));
|
||||
return Ok((Vec::new(), 0))
|
||||
}
|
||||
|
||||
let mut cumulative_gas_used = 0;
|
||||
@ -434,7 +434,7 @@ impl<'a> BlockExecutor for EVMProcessor<'a> {
|
||||
transaction_gas_limit: transaction.gas_limit(),
|
||||
block_available_gas,
|
||||
}
|
||||
.into());
|
||||
.into())
|
||||
}
|
||||
// Execute transaction.
|
||||
let ResultAndState { result, state } = self.transact(transaction, *sender)?;
|
||||
@ -517,7 +517,7 @@ pub fn verify_receipt<'a>(
|
||||
return Err(BlockValidationError::ReceiptRootDiff(
|
||||
GotExpected { got: receipts_root, expected: expected_receipts_root }.into(),
|
||||
)
|
||||
.into());
|
||||
.into())
|
||||
}
|
||||
|
||||
// Create header log bloom.
|
||||
@ -526,7 +526,7 @@ pub fn verify_receipt<'a>(
|
||||
return Err(BlockValidationError::BloomLogDiff(
|
||||
GotExpected { got: logs_bloom, expected: expected_logs_bloom }.into(),
|
||||
)
|
||||
.into());
|
||||
.into())
|
||||
}
|
||||
|
||||
Ok(())
|
||||
|
||||
Reference in New Issue
Block a user