Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
  • Loading branch information
longbowlu committed Jul 26, 2024
1 parent 36c20b3 commit 0070dc9
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions crates/sui-bridge/src/monitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,15 +161,19 @@ async fn get_latest_bridge_committee_with_blocklist_event<C: SuiClientInner>(
let mut any_mismatch = false;
for pk in &event.public_keys {
let member = committee.member(&BridgeAuthorityPublicKeyBytes::from(pk));
if member.is_none() {
// This is possible when a node is processing an older event while the member quitted at a later point,
// Or fullnode returns a stale committee that the member hasn't joined. In either case, It's fine to ignore
// them
let Some(member) = member else {
// This is possible when a node is processing an older event while the member
// quitted at a later point. Or fullnode returns a stale committee that
// the member hasn't joined.
warn!("Committee member not found in the committee: {:?}", pk);
any_mismatch = true;
break;
} else if member.unwrap().is_blocklisted != event.blocklisted {
warn!("Committee member not found in the committee: {:?}", pk);
};
if member.is_blocklisted != event.blocklisted {
warn!(
"Committee member blocklist status does not match onchain record: {:?}",
member
);
any_mismatch = true;
break;
}
Expand Down

0 comments on commit 0070dc9

Please sign in to comment.