Skip to content

Commit

Permalink
Follow new chains only if we own them. (#2598)
Browse files Browse the repository at this point in the history
  • Loading branch information
afck authored Oct 9, 2024
1 parent 0602268 commit 0d82a0c
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions linera-client/src/chain_listener.rs
Original file line number Diff line number Diff line change
Expand Up @@ -274,17 +274,19 @@ where
let key_pair = owners
.iter()
.find_map(|public_key| context_guard.wallet().key_pair_for_pk(public_key));
context_guard
.update_wallet_for_new_chain(new_id, key_pair, timestamp)
.await?;
Self::run_with_chain_id(
new_id,
clients.clone(),
context.clone(),
storage.clone(),
config.clone(),
listening.clone(),
);
if key_pair.is_some() {
context_guard
.update_wallet_for_new_chain(new_id, key_pair, timestamp)
.await?;
Self::run_with_chain_id(
new_id,
clients.clone(),
context.clone(),
storage.clone(),
config.clone(),
listening.clone(),
);
}
}
}
Ok(())
Expand Down

0 comments on commit 0d82a0c

Please sign in to comment.