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 function name and comments errors #362

Merged
merged 2 commits into from
Jan 21, 2025
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -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)>,
Expand All @@ -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
Expand All @@ -107,15 +107,15 @@ 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 {
ShareBundleBody::Tx(tx) => {
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
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions crates/rbuilder/src/primitives/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -628,7 +628,7 @@ impl TransactionSignedEcRecoveredWithBlobs {

impl std::hash::Hash for TransactionSignedEcRecoveredWithBlobs {
fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
//This is enogth to identify the tx
//This is enough to identify the tx
self.tx.hash(state);
}
}
Expand Down
Loading