committed by
GitHub
parent
636b5987af
commit
fc12841d95
@ -36,7 +36,7 @@ impl<'a> KeyedAccount<'a> {
|
||||
}
|
||||
|
||||
pub fn lamports(&self) -> Result<u64, InstructionError> {
|
||||
Ok(self.try_borrow()?.lamports)
|
||||
Ok(self.try_borrow()?.lamports())
|
||||
}
|
||||
|
||||
pub fn data_len(&self) -> Result<usize, InstructionError> {
|
||||
|
@ -267,6 +267,7 @@ where
|
||||
mod test {
|
||||
use super::*;
|
||||
use crate::{
|
||||
account::ReadableAccount,
|
||||
account_utils::State as AccountUtilsState,
|
||||
keyed_account::KeyedAccount,
|
||||
nonce::{self, State},
|
||||
@ -610,9 +611,12 @@ mod test {
|
||||
// Deinitializes Account state
|
||||
assert_eq!(state, State::Uninitialized);
|
||||
// Empties Account balance
|
||||
assert_eq!(nonce_keyed.account.borrow().lamports, expect_nonce_lamports);
|
||||
assert_eq!(
|
||||
nonce_keyed.account.borrow().lamports(),
|
||||
expect_nonce_lamports
|
||||
);
|
||||
// Account balance goes to `to`
|
||||
assert_eq!(to_keyed.account.borrow().lamports, expect_to_lamports);
|
||||
assert_eq!(to_keyed.account.borrow().lamports(), expect_to_lamports);
|
||||
})
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user