Skip to content

Commit

Permalink
fix(listener,metrics): fix counter of sent proofs
Browse files Browse the repository at this point in the history
  • Loading branch information
folex committed Oct 27, 2024
1 parent 944b4b6 commit a01fd26
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_proof_submitted(unit_ids.len()));
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 a01fd26

Please sign in to comment.