Skip to content

Commit

Permalink
fix(listener,metrics): fix counter of sent proofs (#2393)
Browse files Browse the repository at this point in the history
* fix(listener,metrics): fix counter of sent proofs

* fix: typo
  • Loading branch information
folex authored Oct 28, 2024
1 parent 944b4b6 commit 1e7c5cb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion crates/chain-listener/src/listener.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1300,8 +1300,8 @@ impl ChainListener {
}
Ok(tx_id) => {
tracing::info!(target: "chain-listener", "Successfully submitted {} proofs, txHash: {tx_id}", unit_ids.len());
self.observe(|m| m.observe_proofs_submitted(unit_ids.len() as u64));
self.pending_proof_txs.push((tx_id, unit_ids));
self.observe(|m| m.observe_proof_submitted());

Ok(())
}
Expand Down
4 changes: 2 additions & 2 deletions crates/peer-metrics/src/chain_listener.rs
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,8 @@ impl ChainListenerMetrics {
self.ccp_proofs_submit_failed.inc();
}

pub fn observe_proof_submitted(&self) {
self.ccp_proofs_submitted.inc();
pub fn observe_proofs_submitted(&self, proofs: u64) {
self.ccp_proofs_submitted.inc_by(proofs);
}

pub fn observe_proof_tx_success(&self) {
Expand Down

0 comments on commit 1e7c5cb

Please sign in to comment.