Skip to content

Commit

Permalink
solve conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
dailinsubjam committed Oct 11, 2023
1 parent d2a6c6a commit 20187f2
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 13 deletions.
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions crates/hotshot/src/traits/networking/memory_network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ struct MemoryNetworkInner<M: NetworkMsg, K: SignatureKey> {

/// The networking metrics we're keeping track of
metrics: NetworkingMetricsValue,

/// config to introduce unreliability to the network
reliability_config: Option<Arc<RwLock<dyn 'static + NetworkReliability>>>,
}
Expand Down Expand Up @@ -330,7 +330,7 @@ impl<M: NetworkMsg, K: SignatureKey + 'static> ConnectedNetwork<M, K> for Memory
let res = node.broadcast_input(vec.clone()).await;
match res {
Ok(_) => {
self.inner.metrics.outgoing_message_count.add(1);
self.inner.metrics.outgoing_broadcast_message_count.add(1);
trace!(?key, "Delivered message to remote");
}
Err(e) => {
Expand Down Expand Up @@ -374,7 +374,7 @@ impl<M: NetworkMsg, K: SignatureKey + 'static> ConnectedNetwork<M, K> for Memory
let res = node.direct_input(vec).await;
match res {
Ok(_) => {
self.inner.metrics.outgoing_message_count.add(1);
self.inner.metrics.outgoing_direct_message_count.add(1);
trace!(?recipient, "Delivered message to remote");
Ok(())
}
Expand Down
8 changes: 3 additions & 5 deletions crates/task-impls/src/consensus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -816,12 +816,10 @@ where
// starting from the first iteration with a three chain, e.g. right after the else if case nested in the if case above
if new_decide_reached {
let mut leaf = leaf.clone();

consensus
.metrics
.last_synced_block_height
.set(usize::try_from(leaf.height).unwrap_or(0));

.metrics
.last_synced_block_height
.set(usize::try_from(leaf.height).unwrap_or(0));
// If the full block is available for this leaf, include it in the leaf
// chain that we send to the client.
if let Some(block) =
Expand Down
3 changes: 1 addition & 2 deletions crates/types/src/consensus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,7 @@ impl ConsensusMetricsValue {
.create_gauge(String::from("outstanding_transactions"), None),
outstanding_transactions_memory_size: metrics
.create_gauge(String::from("outstanding_transactions_memory_size"), None),
number_of_timeouts: metrics
.create_counter(String::from("number_of_timeouts"), None),
number_of_timeouts: metrics.create_counter(String::from("number_of_timeouts"), None),
}
}
}
Expand Down

0 comments on commit 20187f2

Please sign in to comment.