Skip to content

Commit

Permalink
doc(fake): add rationale for Option in fake::Block
Browse files Browse the repository at this point in the history
  • Loading branch information
CHr15F0x committed Nov 25, 2024
1 parent f4bba46 commit 81c778d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions crates/storage/src/fake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ use crate::{Storage, StorageBuilder};
pub struct Block {
pub header: SignedBlockHeader,
pub transaction_data: Vec<(Transaction, Receipt, Vec<Event>)>,
/// Wrapping in an [`Option`] allows for easy removal of the state update if
/// the caller wishes to fill the db with _partial_ block data.
/// [`generate`] will always populate this field with some fake state
/// update and the user can choose to remove it prior to calling
/// [`fill`] by setting it to `None`.
pub state_update: Option<StateUpdate>,
pub cairo_defs: Vec<(ClassHash, Vec<u8>)>, // Cairo 0 definitions
pub sierra_defs: Vec<(SierraHash, Vec<u8>, Vec<u8>)>, // Sierra + Casm definitions
Expand Down

0 comments on commit 81c778d

Please sign in to comment.