lamports= -> .set_lamports() (#16978)
This commit is contained in:
parent
ac87bc40ca
commit
0af84bb91e
|
@ -3455,7 +3455,10 @@ mod tests {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
// reset balance
|
// reset balance
|
||||||
stake_keyed_account.account.borrow_mut().lamports = total_lamports;
|
stake_keyed_account
|
||||||
|
.account
|
||||||
|
.borrow_mut()
|
||||||
|
.set_lamports(total_lamports);
|
||||||
|
|
||||||
// lockup has expired
|
// lockup has expired
|
||||||
let to_keyed_account = KeyedAccount::new(&to, false, &to_account);
|
let to_keyed_account = KeyedAccount::new(&to, false, &to_account);
|
||||||
|
|
|
@ -9965,7 +9965,7 @@ pub mod tests {
|
||||||
if exit.load(Ordering::Relaxed) {
|
if exit.load(Ordering::Relaxed) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
account.lamports = slot + 1;
|
account.set_lamports(slot + 1);
|
||||||
db.store_cached(slot, &[(&pubkey, &account)]);
|
db.store_cached(slot, &[(&pubkey, &account)]);
|
||||||
db.add_root(slot);
|
db.add_root(slot);
|
||||||
sleep(Duration::from_millis(RACY_SLEEP_MS));
|
sleep(Duration::from_millis(RACY_SLEEP_MS));
|
||||||
|
|
|
@ -173,7 +173,7 @@ mod tests {
|
||||||
let mut collected;
|
let mut collected;
|
||||||
let pubkey = solana_sdk::pubkey::new_rand();
|
let pubkey = solana_sdk::pubkey::new_rand();
|
||||||
|
|
||||||
account.lamports = huge_lamports;
|
account.set_lamports(huge_lamports);
|
||||||
assert_eq!(account.rent_epoch(), 0);
|
assert_eq!(account.rent_epoch(), 0);
|
||||||
|
|
||||||
// create a tested rent collector
|
// create a tested rent collector
|
||||||
|
@ -185,7 +185,7 @@ mod tests {
|
||||||
assert_eq!(collected, 0);
|
assert_eq!(collected, 0);
|
||||||
|
|
||||||
// decrease the balance not to be rent-exempt
|
// decrease the balance not to be rent-exempt
|
||||||
account.lamports = tiny_lamports;
|
account.set_lamports(tiny_lamports);
|
||||||
|
|
||||||
// ... and trigger another rent collection on the same epoch and check that rent is working
|
// ... and trigger another rent collection on the same epoch and check that rent is working
|
||||||
collected = rent_collector.collect_from_existing_account(&pubkey, &mut account);
|
collected = rent_collector.collect_from_existing_account(&pubkey, &mut account);
|
||||||
|
|
Loading…
Reference in New Issue