turn on rent (#7368)
* turn on rent * add rent exempt balances for bootstrap accounts * use Rent::free() when not testing rent
This commit is contained in:
@ -172,7 +172,7 @@ mod tests {
|
||||
vec![(0u64, &Hash::default()); 32].into_iter(),
|
||||
)
|
||||
} else if sysvar::rent::check_id(&meta.pubkey) {
|
||||
sysvar::rent::create_account(1, &Rent::default())
|
||||
sysvar::rent::create_account(1, &Rent::free())
|
||||
} else {
|
||||
Account::default()
|
||||
}
|
||||
@ -276,7 +276,7 @@ mod tests {
|
||||
KeyedAccount::new(
|
||||
&sysvar::rent::id(),
|
||||
false,
|
||||
&mut sysvar::rent::create_account(1, &Rent::default()),
|
||||
&mut sysvar::rent::create_account(1, &Rent::free()),
|
||||
),
|
||||
],
|
||||
&serialize(&NonceInstruction::Initialize).unwrap(),
|
||||
@ -409,7 +409,7 @@ mod tests {
|
||||
KeyedAccount::new(
|
||||
&sysvar::rent::id(),
|
||||
false,
|
||||
&mut sysvar::rent::create_account(1, &Rent::default())
|
||||
&mut sysvar::rent::create_account(1, &Rent::free())
|
||||
),
|
||||
],
|
||||
&serialize(&NonceInstruction::Withdraw(42)).unwrap(),
|
||||
@ -526,7 +526,7 @@ mod tests {
|
||||
KeyedAccount::new(
|
||||
&sysvar::rent::id(),
|
||||
false,
|
||||
&mut sysvar::rent::create_account(1, &Rent::default())
|
||||
&mut sysvar::rent::create_account(1, &Rent::free())
|
||||
),
|
||||
],
|
||||
&serialize(&NonceInstruction::Initialize).unwrap(),
|
||||
|
@ -18,7 +18,7 @@ pub struct Rent {
|
||||
/// $1 per SOL
|
||||
/// $0.01 per megabyte day
|
||||
/// $3.65 per megabyte year
|
||||
pub const DEFAULT_LAMPORTS_PER_BYTE_YEAR: u64 = 0; //1_000_000_000 / 100 * 365 / (1024 * 1024);
|
||||
pub const DEFAULT_LAMPORTS_PER_BYTE_YEAR: u64 = 1_000_000_000 / 100 * 365 / (1024 * 1024);
|
||||
|
||||
/// default amount of time (in years) the balance has to include rent for
|
||||
pub const DEFAULT_EXEMPTION_THRESHOLD: f64 = 2.0;
|
||||
|
Reference in New Issue
Block a user