Skip to content

Commit

Permalink
[pallet-revive] eth-rpc error logging (#7251)
Browse files Browse the repository at this point in the history
Log error instead of failing with an error when block processing fails

---------

Co-authored-by: command-bot <>
  • Loading branch information
pgherveou authored Jan 20, 2025
1 parent d5d9b12 commit ea27696
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: alloc::borrow::Cow::Borrowed("westmint"),
impl_name: alloc::borrow::Cow::Borrowed("westmint"),
authoring_version: 1,
spec_version: 1_017_004,
spec_version: 1_017_005,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 16,
Expand Down
7 changes: 7 additions & 0 deletions prdoc/pr_7251.prdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
title: '[pallet-revive] eth-rpc error logging'
doc:
- audience: Runtime Dev
description: Log error instead of failing with an error when block processing fails
crates:
- name: pallet-revive-eth-rpc
bump: minor
4 changes: 3 additions & 1 deletion substrate/frame/revive/rpc/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,9 @@ impl Client {
};

log::debug!(target: LOG_TARGET, "Pushing block: {}", block.number());
callback(block).await?;
if let Err(err) = callback(block).await {
log::error!(target: LOG_TARGET, "Failed to process block: {err:?}");
}
}

log::info!(target: LOG_TARGET, "Block subscription ended");
Expand Down

0 comments on commit ea27696

Please sign in to comment.