Skip to content

Commit 5fb1616

Browse files
authored
Backport: Do not process inboxes of non-owned chains (#4825) (#4832)
## 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. This is a backport of #4825 to the `testnet_conway` branch. ## Test Plan CI ## Release Plan - Nothing to do ## Links - [reviewer checklist](https://github.com/linera-io/linera-protocol/blob/main/CONTRIBUTING.md#reviewer-checklist)
1 parent 2d7e41f commit 5fb1616

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
@@ -495,6 +495,10 @@ impl<C: ClientContext + 'static> ChainListener<C> {
495495
debug!("Not processing inbox for non-tracked chain {chain_id:.8}");
496496
return Ok(());
497497
}
498+
if listening_client.client.preferred_owner().is_none() {
499+
debug!("Not processing inbox for non-owned chain {chain_id:.8}");
500+
return Ok(());
501+
}
498502
debug!("Processing inbox for {chain_id:.8}");
499503
listening_client.timeout = Timestamp::from(u64::MAX);
500504
match listening_client

0 commit comments

Comments
 (0)