Skip to content

Commit 9a70142

Browse files
authored
Fix typos (#448)
1 parent 3ba9805 commit 9a70142

9 files changed

Lines changed: 18 additions & 18 deletions

File tree

auction-server/src/api/ws.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,8 @@ impl WsState {
124124
pub async fn get_new_subscriber_id(&self, ip: Option<IpAddr>) -> Option<SubscriberId> {
125125
let id = self.subscriber_counter.fetch_add(1, Ordering::SeqCst);
126126
if let Some(ip) = ip {
127-
let mut write_gaurd = self.subscriber_per_ip.write().await;
128-
let ids = write_gaurd.entry(ip).or_insert_with(HashSet::new);
127+
let mut write_guard = self.subscriber_per_ip.write().await;
128+
let ids = write_guard.entry(ip).or_insert_with(HashSet::new);
129129
if ids.len() >= MAXIMUM_SUBSCRIBERS_PER_IP {
130130
return None;
131131
}
@@ -136,11 +136,11 @@ impl WsState {
136136

137137
pub async fn remove_subscriber(&self, id: SubscriberId, ip: Option<IpAddr>) {
138138
if let Some(ip) = ip {
139-
let mut write_gaurd = self.subscriber_per_ip.write().await;
140-
if let Some(ids) = write_gaurd.get_mut(&ip) {
139+
let mut write_guard = self.subscriber_per_ip.write().await;
140+
if let Some(ids) = write_guard.get_mut(&ip) {
141141
ids.remove(&id);
142142
if ids.is_empty() {
143-
write_gaurd.remove(&ip);
143+
write_guard.remove(&ip);
144144
}
145145
}
146146
}

auction-server/src/auction/repository/add_recent_priotization_fee.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use {
1111
};
1212

1313
impl Repository<Svm> {
14-
pub async fn add_recent_priotization_fee(&self, fee: u64) {
14+
pub async fn add_recent_prioritization_fee(&self, fee: u64) {
1515
let mut write_guard = self
1616
.in_memory_store
1717
.chain_store

auction-server/src/auction/repository/update_in_memory_auction.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ impl<T: ChainTrait> Repository<T> {
1010
#[tracing::instrument(skip_all, fields(auction_id))]
1111
pub async fn update_in_memory_auction(&self, auction: entities::Auction<T>) {
1212
tracing::Span::current().record("auction_id", auction.id.to_string());
13-
let mut write_gaurd = self.in_memory_store.auctions.write().await;
14-
match write_gaurd.get_mut(&auction.id) {
13+
let mut write_guard = self.in_memory_store.auctions.write().await;
14+
match write_guard.get_mut(&auction.id) {
1515
Some(a) => {
1616
*a = auction;
1717
}

auction-server/src/auction/service/conclude_auction.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ where
105105
})
106106
.await?;
107107
} else if Self::is_auction_expired(&auction) {
108-
// This only happens if auction submission to chain failes
108+
// This only happens if auction submission to chain fails
109109
// This is a very rare case and should not happen
110110
tracing::warn!("Auction has no transaction hash and is expired");
111111
let lost_status = T::BidStatusType::new_lost();

auction-server/src/auction/service/handle_auction.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ where
3131
async fn submit_auction<'a>(
3232
&self,
3333
auction: entities::Auction<T>,
34-
_auction_mutex_gaurd: MutexGuard<'a, ()>,
34+
_auction_mutex_guard: MutexGuard<'a, ()>,
3535
) -> anyhow::Result<()> {
3636
tracing::Span::current().record("auction_id", auction.id.to_string());
3737
tracing::Span::current().record(

auction-server/src/auction/service/update_recent_prioritization_fee.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use {
1010
pub const RECENT_FEES_SLOT_WINDOW: usize = 12;
1111

1212
impl Service<Svm> {
13-
/// Returns an estimate of recent priotization fees.
13+
/// Returns an estimate of recent prioritization fees.
1414
/// For each of the last 150 slots, client returns the `config.prioritization_fee_percentile`th percentile
1515
/// of prioritization fees for transactions that landed in that slot.
1616
/// The median of such values for the `RECENT_FEES_SLOT_WINDOW` most recent slots is returned.
@@ -53,7 +53,7 @@ impl Service<Svm> {
5353
RestError::TemporarilyUnavailable
5454
})?;
5555

56-
self.repo.add_recent_priotization_fee(fee).await;
56+
self.repo.add_recent_prioritization_fee(fee).await;
5757
Ok(fee)
5858
}
5959
}

auction-server/src/auction/service/verification.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2246,7 +2246,7 @@ mod tests {
22462246
let minimum_budget = 10;
22472247
service
22482248
.repo
2249-
.add_recent_priotization_fee(minimum_budget)
2249+
.add_recent_prioritization_fee(minimum_budget)
22502250
.await;
22512251
let result =
22522252
get_verify_bid_result(service, searcher, vec![], opportunities[0].clone()).await;
@@ -2265,7 +2265,7 @@ mod tests {
22652265
compute_budget::ComputeBudgetInstruction::set_compute_unit_price(minimum_budget - 1);
22662266
service
22672267
.repo
2268-
.add_recent_priotization_fee(minimum_budget)
2268+
.add_recent_prioritization_fee(minimum_budget)
22692269
.await;
22702270
let result = get_verify_bid_result(
22712271
service,

auction-server/src/config/server.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use {
66
const DEFAULT_LISTEN_ADDR: &str = "127.0.0.1:9000";
77
const DEFAULT_METRICS_ADDR: &str = "127.0.0.1:9001";
88
const DEFAULT_DATABASE_MAX_CONNECTIONS: &str = "10";
9-
const DEAFULT_REQUESTER_IP_HEADER_NAME: &str = "X-Forwarded-For";
9+
const DEFAULT_REQUESTER_IP_HEADER_NAME: &str = "X-Forwarded-For";
1010

1111
#[derive(Args, Clone, Debug)]
1212
#[command(next_help_heading = "Server Options")]
@@ -33,7 +33,7 @@ pub struct Options {
3333
pub metrics_addr: SocketAddr,
3434
/// The header name to use for the requester IP address.
3535
#[arg(long = "requester-ip-header-name")]
36-
#[arg(default_value = DEAFULT_REQUESTER_IP_HEADER_NAME)]
36+
#[arg(default_value = DEFAULT_REQUESTER_IP_HEADER_NAME)]
3737
#[arg(env = "REQUESTER_IP_HEADER_NAME")]
3838
pub requester_ip_header_name: String,
3939
}

auction-server/src/opportunity/service/handle_opportunity_bid.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ pub struct HandleOpportunityBidInput {
4545
}
4646

4747
fn parse_revert_error(revert: &Bytes) -> Option<String> {
48-
let apdapter_decoded =
48+
let adapter_decoded =
4949
OpportunityAdapterErrors::decode_with_selector(revert).map(|decoded_error| {
5050
format!(
5151
"Opportunity Adapter Contract Revert Error: {:#?}",
@@ -54,7 +54,7 @@ fn parse_revert_error(revert: &Bytes) -> Option<String> {
5454
});
5555
let erc20_decoded = erc20::ERC20Errors::decode_with_selector(revert)
5656
.map(|decoded_error| format!("ERC20 Contract Revert Error: {:#?}", decoded_error));
57-
apdapter_decoded.or(erc20_decoded)
57+
adapter_decoded.or(erc20_decoded)
5858
}
5959

6060
impl Service<ChainTypeEvm> {

0 commit comments

Comments
 (0)