diff --git a/runtime/src/vote_account.rs b/runtime/src/vote_account.rs index daaae5af9abbf6..e5c268f401b3aa 100644 --- a/runtime/src/vote_account.rs +++ b/runtime/src/vote_account.rs @@ -5,7 +5,7 @@ use { ser::{Serialize, Serializer}, }, solana_sdk::{ - account::{Account, AccountSharedData}, + account::{Account, AccountSharedData, ReadableAccount}, instruction::InstructionError, pubkey::Pubkey, }, @@ -57,7 +57,7 @@ impl VoteAccount { } pub(crate) fn lamports(&self) -> u64 { - self.account().lamports + self.account().lamports() } pub fn vote_state(&self) -> RwLockReadGuard> { @@ -405,7 +405,7 @@ mod tests { fn test_vote_account() { let mut rng = rand::thread_rng(); let (account, vote_state) = new_rand_vote_account(&mut rng, None); - let lamports = account.lamports; + let lamports = account.lamports(); let vote_account = VoteAccount::from(account); assert_eq!(lamports, vote_account.lamports()); assert_eq!(vote_state, *vote_account.vote_state().as_ref().unwrap());