diff --git a/runtime/src/stakes.rs b/runtime/src/stakes.rs index b9cd322f79b2b3..0fc78f4bf9f006 100644 --- a/runtime/src/stakes.rs +++ b/runtime/src/stakes.rs @@ -235,18 +235,9 @@ impl Stakes { None => return Err(Error::VoteAccountNotFound(*pubkey)), Some(account) => account, }; - // Ignoring rent_epoch until the feature for - // preserve_rent_epoch_for_rent_exempt_accounts is activated. let vote_account = vote_account.account(); - if vote_account.lamports() != account.lamports() - || vote_account.owner() != account.owner() - || vote_account.executable() != account.executable() - || vote_account.data() != account.data() - { - error!( - "vote account mismatch: {}, {:?}, {:?}", - pubkey, vote_account, account - ); + if vote_account != &account { + error!("vote account mismatch: {pubkey}, {vote_account:?}, {account:?}"); return Err(Error::VoteAccountMismatch(*pubkey)); } } @@ -266,7 +257,7 @@ impl Stakes { if VoteState::is_correct_size_and_initialized(account.data()) && VoteAccount::try_from(account.clone()).is_ok() { - error!("vote account not cached: {}, {:?}", pubkey, account); + error!("vote account not cached: {pubkey}, {account:?}"); return Err(Error::VoteAccountNotCached(pubkey)); } }