Skip to content

Commit 81be8a6

Browse files
committed
doc: cleanup a bit
1 parent 549f875 commit 81be8a6

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/evm.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -786,8 +786,7 @@ impl<'a, Ext, Db: Database + DatabaseCommit, TrevmState: NeedsBlock>
786786
}
787787

788788
/// Open a block and return the EVM ready for the next transaction. This is
789-
/// a convenience API, and is equivalent to `open_block(filler,
790-
/// BasicContext::default())`.
789+
/// a convenience API and uses [`BasicContext`] for the block context.
791790
///
792791
/// This is a shortcut for `open_block(filler, BasicContext::default())`.
793792
/// It will not perform any pre-block or post-block logic, and will not

src/lifecycle/contexts.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ use revm::{
2424
use std::{collections::HashMap, sync::OnceLock};
2525

2626
/// A context that performs the fewest meaingful actions. Specifically, it
27-
/// fills the block, and applies transactions to the EVM db.
27+
/// fills the block, and applies transactions to the EVM db. It does not apply
28+
/// any pre- or post-block actions.
2829
#[derive(Debug, Copy, Clone, PartialEq, Eq, Default)]
2930
pub struct BasicContext;
3031

@@ -156,7 +157,7 @@ impl Shanghai<'_> {
156157
}
157158

158159
/// Get the block outputs. This contains receipts and senders.
159-
pub fn outputs(&self) -> &BlockOutput {
160+
pub const fn outputs(&self) -> &BlockOutput {
160161
&self.outputs
161162
}
162163

@@ -311,6 +312,7 @@ where
311312
}
312313

313314
impl Prague<'_> {
315+
/// Finds deposit logs for the most recent receipt.
314316
fn find_deposit_logs(&mut self) {
315317
let receipt =
316318
self.cancun.shanghai.outputs.receipts().last().expect("produced in shanghai lifecycle");
@@ -328,7 +330,8 @@ impl Prague<'_> {
328330

329331
/// Apply the pre-block logic for [EIP-2935]. This logic was introduced in
330332
/// Prague and updates historical block hashes in a special system
331-
/// contract. Unlike other system transactions, this is NOT modeled as a transaction.
333+
/// contract. Unlike other system actions, this is NOT modeled as a
334+
/// transaction.
332335
///
333336
/// [EIP-2935]: https://eips.ethereum.org/EIPS/eip-2935
334337
pub fn apply_eip2935<Ext, Db>(

0 commit comments

Comments
 (0)