From 2f8800a238c2e0ac9a4964e4ba024ceada06d3d8 Mon Sep 17 00:00:00 2001 From: Pavel Date: Sat, 18 Jan 2025 21:29:11 +0300 Subject: [PATCH 1/2] mod.rs --- crates/rbuilder/src/primitives/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/rbuilder/src/primitives/mod.rs b/crates/rbuilder/src/primitives/mod.rs index 113ae0ba..57634126 100644 --- a/crates/rbuilder/src/primitives/mod.rs +++ b/crates/rbuilder/src/primitives/mod.rs @@ -258,7 +258,7 @@ pub struct Refund { } /// Users can specify how to get kickbacks and this is propagated by the MEV-Share Node to us. -/// We get this configuration as multiple RefundConfigs, then the refunds are payed to the specified addresses in the indicated percentages. +/// We get this configuration as multiple RefundConfigs, then the refunds are paid to the specified addresses in the indicated percentages. /// The sum of all RefundConfig::percent on a mev share bundle should be 100%. /// See [ShareBundleInner::refund_config] for more details. #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)] @@ -545,7 +545,7 @@ impl TransactionSignedEcRecoveredWithBlobs { } /// Encodes the "raw" canonical format of transaction (NOT the one used in `eth_sendRawTransaction`) BLOB DATA IS NOT ENCODED. - /// I intensionally omitted the version with blob data since we don't use it and may lead to confusions/bugs. + /// I intentsionally omitted the version with blob data since we don't use it and may lead to confusions/bugs. /// USE CAREFULLY since this exposes the signed tx. pub fn envelope_encoded_no_blobs(&self) -> Bytes { let mut buf = Vec::new(); @@ -628,7 +628,7 @@ impl TransactionSignedEcRecoveredWithBlobs { impl std::hash::Hash for TransactionSignedEcRecoveredWithBlobs { fn hash(&self, state: &mut H) { - //This is enogth to identify the tx + //This is enough to identify the tx self.tx.hash(state); } } From c13d9cb9ec72ae17d8f3c41c78b7e511f4513289 Mon Sep 17 00:00:00 2001 From: Pavel Date: Sat, 18 Jan 2025 21:34:18 +0300 Subject: [PATCH 2/2] find_landed_orders.rs --- .../restore_landed_orders/find_landed_orders.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/crates/rbuilder/src/backtest/restore_landed_orders/find_landed_orders.rs b/crates/rbuilder/src/backtest/restore_landed_orders/find_landed_orders.rs index 47a2b136..53c016a3 100644 --- a/crates/rbuilder/src/backtest/restore_landed_orders/find_landed_orders.rs +++ b/crates/rbuilder/src/backtest/restore_landed_orders/find_landed_orders.rs @@ -78,7 +78,7 @@ impl OrderChunk { let mut accumulated_chunks = Vec::new(); - let mut prev_element_payed_refund = false; + let mut prev_element_paid_refund = false; let mut current_chunk_txs = Vec::new(); let release_chunk = |current_chunk_txs: &mut Vec<(B256, TxRevertBehavior)>, @@ -96,8 +96,8 @@ impl OrderChunk { for (idx, body) in inner.body.iter().enumerate() { let current_element_pays_refund = !inner.refund.iter().any(|r| r.body_idx == idx); - if prev_element_payed_refund != current_element_pays_refund { - let chunk_refund_percent = if prev_element_payed_refund { + if prev_element_paid_refund != current_element_pays_refund { + let chunk_refund_percent = if prev_element_paid_refund { total_refund_percent } else { 0 @@ -107,7 +107,7 @@ impl OrderChunk { &mut accumulated_chunks, chunk_refund_percent, ); - prev_element_payed_refund = current_element_pays_refund; + prev_element_paid_refund = current_element_pays_refund; } match body { @@ -115,7 +115,7 @@ impl OrderChunk { current_chunk_txs.push((tx.hash(), tx.revert_behavior)); } ShareBundleBody::Bundle(inner_bundle) => { - let chunk_refund_percent = if prev_element_payed_refund { + let chunk_refund_percent = if prev_element_paid_refund { total_refund_percent } else { 0 @@ -143,7 +143,7 @@ impl OrderChunk { } } - let chunk_refund_percent = if prev_element_payed_refund { + let chunk_refund_percent = if prev_element_paid_refund { total_refund_percent } else { 0