owner -> owner() (#16783)

This commit is contained in:
Jeff Washington (jwash)
2021-04-26 12:06:40 -05:00
committed by GitHub
parent aeff911c93
commit f2ab0384e4
10 changed files with 30 additions and 30 deletions

View File

@ -48,7 +48,7 @@ impl<'a> KeyedAccount<'a> {
}
pub fn owner(&self) -> Result<Pubkey, InstructionError> {
Ok(self.try_borrow()?.owner)
Ok(*self.try_borrow()?.owner())
}
pub fn executable(&self) -> Result<bool, InstructionError> {

View File

@ -1,5 +1,5 @@
use crate::{
account::AccountSharedData,
account::{AccountSharedData, ReadableAccount},
account_utils::StateMut,
fee_calculator::FeeCalculator,
hash::Hash,
@ -20,7 +20,7 @@ pub fn create_account(lamports: u64) -> RefCell<AccountSharedData> {
}
pub fn verify_nonce_account(acc: &AccountSharedData, hash: &Hash) -> bool {
if acc.owner != crate::system_program::id() {
if acc.owner() != &crate::system_program::id() {
return false;
}
match StateMut::<Versions>::state(acc).map(|v| v.convert_to_current()) {