Skip to content

Commit 8891f2e

Browse files
authored
Do not process inboxes of non-owned chains (#4825)
## Motivation A service running without skipping process-inbox would spam the logs with a `warn` level message if it followed a non-owned chain. ## Proposal Skip processing the inbox in the listener if the chain isn't owned. ## Test Plan CI ## Release Plan - These changes should be backported to the latest `testnet` branch, then - be released in a new SDK ## Links - [reviewer checklist](https://github.com/linera-io/linera-protocol/blob/main/CONTRIBUTING.md#reviewer-checklist)
1 parent c6ba3de commit 8891f2e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

linera-client/src/chain_listener.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -572,6 +572,10 @@ impl<C: ClientContext + 'static> ChainListener<C> {
572572
debug!("Not processing inbox for non-tracked chain {chain_id:.8}");
573573
return Ok(());
574574
}
575+
if listening_client.client.preferred_owner().is_none() {
576+
debug!("Not processing inbox for non-owned chain {chain_id:.8}");
577+
return Ok(());
578+
}
575579
debug!("Processing inbox for {chain_id:.8}");
576580
listening_client.timeout = Timestamp::from(u64::MAX);
577581
match listening_client

0 commit comments

Comments
 (0)