move Account to solana-sdk (#13198)
This commit is contained in:
@@ -2,25 +2,8 @@
|
||||
//!
|
||||
pub use crate::rent::Rent;
|
||||
|
||||
use crate::{account::Account, sysvar::Sysvar};
|
||||
use crate::sysvar::Sysvar;
|
||||
|
||||
crate::declare_sysvar_id!("SysvarRent111111111111111111111111111111111", Rent);
|
||||
|
||||
impl Sysvar for Rent {}
|
||||
|
||||
pub fn create_account(lamports: u64, rent: &Rent) -> Account {
|
||||
rent.create_account(lamports)
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn test_rent_create_account() {
|
||||
let lamports = 42;
|
||||
let account = create_account(lamports, &Rent::default());
|
||||
let rent = Rent::from_account(&account).unwrap();
|
||||
assert_eq!(rent, Rent::default());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user