Skip to content

Commit

Permalink
cleaning more the code
Browse files Browse the repository at this point in the history
  • Loading branch information
alexisbatyk committed Jan 13, 2025
1 parent 422225e commit 558457b
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions crates/fdev/src/network_metrics_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -763,9 +763,6 @@ impl ServerState {

match self.transactions_data.entry(tx_id.clone()) {
dashmap::mapref::entry::Entry::Occupied(mut occ) => {
tracing::info!(
"found transaction data, adding BroadcastEmitted to history"
);
let changes = occ.get_mut();
changes.push(Change::BroadcastEmitted {
tx_id: tx_id.clone(),
Expand All @@ -783,8 +780,7 @@ impl ServerState {
}
dashmap::mapref::entry::Entry::Vacant(_vac) => {
// this should not happen
tracing::error!("this tx should be included on transactions_data. It should exists a PutRequest before BroadcastEmitted.");
unreachable!();
unreachable!("this tx should be included on transactions_data. It should exists a PutRequest before BroadcastEmitted.");
}
}

Expand Down Expand Up @@ -824,9 +820,6 @@ impl ServerState {

match self.transactions_data.entry(tx_id.clone()) {
dashmap::mapref::entry::Entry::Occupied(mut occ) => {
tracing::info!(
"found transaction data, adding BroadcastReceived to history"
);
let changes = occ.get_mut();
changes.push(Change::BroadcastReceived {
tx_id: tx_id.clone(),
Expand Down Expand Up @@ -907,9 +900,7 @@ impl ServerState {
timestamp,
target: target.clone(),
});
tracing::info!("found transaction data, adding GetContract to history");
} else {
tracing::info!("running get_contract but with a new transaction");
self.transactions_data.insert(
transaction.clone(),
vec![Change::GetContract {
Expand All @@ -921,8 +912,6 @@ impl ServerState {
target: target.clone(),
}],
);

tracing::info!("finished inserting new get_contract transaction");
}

tracing::debug!(%key, %contract_location, "checking values from save_record -- get_contract");
Expand Down Expand Up @@ -981,11 +970,7 @@ impl ServerState {
at_peer_location,
timestamp,
});
tracing::info!(
"found transaction data, adding SubscribedToContract to history"
);
} else {
tracing::info!("running subscribed_to contract but with a new transaction");
self.transactions_data.insert(
transaction.clone(),
vec![Change::SubscribedToContract {
Expand All @@ -998,8 +983,6 @@ impl ServerState {
timestamp,
}],
);

tracing::info!("finished inserting new subscribed_to transaction");
}

tracing::debug!(%key, %contract_location, "checking values from save_record -- subscribed_to msg");
Expand Down

0 comments on commit 558457b

Please sign in to comment.