Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix spelling errors in l1_gas_price.rs, trace.rs, l1_db.rs, and client.rs #481

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/madara/client/db/src/l1_db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ type Result<T, E = MadaraStorageError> = std::result::Result<T, E>;

pub const LAST_SYNCED_L1_EVENT_BLOCK: &[u8] = b"LAST_SYNCED_L1_EVENT_BLOCK";

/// Struct to store block number and event_index where L1->L2 Message occured
/// Struct to store block number and event_index where L1->L2 Message occurred
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct LastSyncedEventBlock {
pub block_number: u64,
Expand Down
2 changes: 1 addition & 1 deletion crates/madara/client/eth/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ impl EthereumClient {
pub async fn get_last_event_block_number<T: SolEvent>(&self) -> anyhow::Result<u64> {
let latest_block: u64 = self.get_latest_block_number().await?;

// Assuming an avg Block time of 15sec we check for a LogStateUpdate occurence in the last ~24h
// Assuming an avg Block time of 15sec we check for a LogStateUpdate occurrence in the last ~24h
let filter = Filter::new()
.from_block(latest_block - 6000)
.to_block(latest_block)
Expand Down
4 changes: 2 additions & 2 deletions crates/madara/client/eth/src/l1_gas_price.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ pub async fn gas_price_worker_once(
let last_update_timestamp = l1_gas_provider.get_gas_prices_last_update();
let duration_since_last_update = SystemTime::now().duration_since(last_update_timestamp)?;

let last_update_timestemp =
let last_update_timestamp =
last_update_timestamp.duration_since(UNIX_EPOCH).expect("SystemTime before UNIX EPOCH!").as_micros();
if duration_since_last_update > 10 * gas_price_poll_ms {
anyhow::bail!(
"Gas prices have not been updated for {} ms. Last update was at {}",
duration_since_last_update.as_micros(),
last_update_timestemp
last_update_timestamp
);
}

Expand Down
4 changes: 2 additions & 2 deletions crates/madara/client/exec/src/trace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ pub fn execution_result_to_tx_trace(
let fee_transfer_invocation =
execution_info.fee_transfer_call_info.as_ref().map(try_get_funtion_invocation_from_call_info).transpose()?;

let computation_resources = agregate_execution_ressources(
let computation_resources = aggregate_execution_ressources(
validate_invocation.as_ref().map(|value| value.execution_resources.clone()).as_ref(),
execute_function_invocation.as_ref().map(|value| value.execution_resources.clone()).as_ref(),
fee_transfer_invocation.as_ref().map(|value| value.execution_resources.clone()).as_ref(),
Expand Down Expand Up @@ -273,7 +273,7 @@ fn state_diff_is_empty(commitment_state_diff: &CommitmentStateDiff) -> bool {
&& commitment_state_diff.class_hash_to_compiled_class_hash.is_empty()
}

fn agregate_execution_ressources(
fn aggregate_execution_ressources(
a: Option<&starknet_types_rpc::ComputationResources>,
b: Option<&starknet_types_rpc::ComputationResources>,
c: Option<&starknet_types_rpc::ComputationResources>,
Expand Down