Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
7 changes: 7 additions & 0 deletions prdoc/pr_10451.prdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
title: Accept custom capacity for block notifier buffer
doc:
- audience: Runtime Dev
description: Add a setter for a custom block notifier
crates:
- name: pallet-revive-eth-rpc
bump: minor
5 changes: 5 additions & 0 deletions substrate/frame/revive/rpc/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,11 @@ impl Client {
self.block_notifier = Some(tokio::sync::broadcast::channel::<H256>(NOTIFIER_CAPACITY).0);
}

/// Sets a block notifier
pub fn set_block_notifier(&mut self, notifier: Option<tokio::sync::broadcast::Sender<H256>>) {
self.block_notifier = notifier;
}

/// Subscribe to past blocks executing the callback for each block in `range`.
async fn subscribe_past_blocks<F, Fut>(
&self,
Expand Down
Loading