Soften vote account identity mismatch from panic to runtime error
This commit is contained in:
@ -1157,10 +1157,6 @@ impl Tower {
|
|||||||
self.node_pubkey,
|
self.node_pubkey,
|
||||||
bank.slot(),
|
bank.slot(),
|
||||||
);
|
);
|
||||||
assert_eq!(
|
|
||||||
self.vote_state.node_pubkey, self.node_pubkey,
|
|
||||||
"vote account's node_pubkey doesn't match",
|
|
||||||
);
|
|
||||||
} else {
|
} else {
|
||||||
self.initialize_root(root);
|
self.initialize_root(root);
|
||||||
info!(
|
info!(
|
||||||
|
@ -1454,6 +1454,14 @@ impl ReplayStage {
|
|||||||
}
|
}
|
||||||
Ok(vote_state) => vote_state,
|
Ok(vote_state) => vote_state,
|
||||||
};
|
};
|
||||||
|
if vote_state.node_pubkey != node_keypair.pubkey() {
|
||||||
|
info!(
|
||||||
|
"Vote account node_pubkey mismatch: {} (expected: {}). Unable to vote",
|
||||||
|
vote_state.node_pubkey,
|
||||||
|
node_keypair.pubkey()
|
||||||
|
);
|
||||||
|
return None;
|
||||||
|
}
|
||||||
let authorized_voter_pubkey =
|
let authorized_voter_pubkey =
|
||||||
if let Some(authorized_voter_pubkey) = vote_state.get_authorized_voter(bank.epoch()) {
|
if let Some(authorized_voter_pubkey) = vote_state.get_authorized_voter(bank.epoch()) {
|
||||||
authorized_voter_pubkey
|
authorized_voter_pubkey
|
||||||
|
Reference in New Issue
Block a user