Skip to content

Commit

Permalink
feat(papyrus_protobuf): impl Default for BlockInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
asmaastarkware committed Feb 4, 2025
1 parent 309289d commit b8738c4
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions crates/papyrus_protobuf/src/consensus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,21 @@ pub struct BlockInfo {
pub eth_to_strk_rate: u64,
}

impl Default for BlockInfo {
fn default() -> Self {
BlockInfo {
height: Default::default(),
timestamp: Default::default(),
builder: Default::default(),
l1_da_mode: Default::default(),
l2_gas_price_fri: 1,
l1_gas_price_wei: 1,
l1_data_gas_price_wei: 1,
eth_to_strk_rate: 1,
}
}
}

/// A temporary constant to use as a validator ID. Zero is not a valid contract address.
// TODO(Matan): Remove this once we have a proper validator set.
pub const DEFAULT_VALIDATOR_ID: u64 = 100;
Expand Down

0 comments on commit b8738c4

Please sign in to comment.