Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(sui): fix sui validator display-metadata for pending validators #20354

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions crates/sui/src/validator_commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ use url::{ParseError, Url};
use sui_types::{
base_types::{ObjectID, ObjectRef, SuiAddress},
crypto::{AuthorityPublicKey, NetworkPublicKey, Signable, DEFAULT_EPOCH_ID},
dynamic_field::Field,
multiaddr::Multiaddr,
object::Owner,
sui_system_state::{
Expand Down Expand Up @@ -1090,15 +1091,15 @@ async fn get_pending_candidate_summary(
object_id
)
})?;
let val = bcs::from_bytes::<ValidatorV1>(bcs).map_err(|e| {
let field = bcs::from_bytes::<Field<u64, ValidatorV1>>(bcs).map_err(|e| {
anyhow::anyhow!(
"Can't convert bcs bytes of object {} to ValidatorV1: {}",
object_id,
e,
)
})?;
if val.verified_metadata().sui_address == validator_address {
return Ok(Some(val));
if field.value.verified_metadata().sui_address == validator_address {
return Ok(Some(field.value));
}
}
Ok(None)
Expand Down
Loading