Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(bridge-withdrawer): also set metric when value 0 #1771

Merged
merged 2 commits into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions crates/astria-bridge-withdrawer/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@

## [Unreleased]

### Fixed

- Fix metric `set_batch_total_settled_value` to set to zero when no transactions are settled

Check failure on line 14 in crates/astria-bridge-withdrawer/CHANGELOG.md

View workflow job for this annotation

GitHub Actions / markdown

Line length

crates/astria-bridge-withdrawer/CHANGELOG.md:14:81 MD013/line-length Line length [Expected: 80; Actual: 92] https://github.com/DavidAnson/markdownlint/blob/v0.29.0/doc/md013.md

## [1.0.0] - 2024-10-25

### Changed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -380,17 +380,16 @@ async fn get_and_forward_block_events(
if actions.is_empty() {
info!(
"no withdrawal actions found for block `{block_hash}` at rollup height \
`{rollup_height}; skipping"
`{rollup_height}"
);
} else {
submitter_handle
.send_batch(Batch {
actions,
rollup_height,
})
.await
.wrap_err("failed to send batched events; receiver dropped?")?;
}
submitter_handle
.send_batch(Batch {
actions,
rollup_height,
})
.await
.wrap_err("failed to send batched events; receiver dropped?")?;

Ok(())
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,13 @@ impl Submitter {
metrics,
..
} = self;

if actions.is_empty() {
metrics.set_batch_total_settled_value(0);

return Ok(());
}

// get nonce and make unsigned transaction
let nonce = get_pending_nonce(
sequencer_grpc_client.clone(),
Expand Down
Loading