program-test: Use "max" for program account lamports (#29880)
This commit is contained in:
parent
9193b4221d
commit
8f4bcf7fee
|
@ -616,7 +616,7 @@ impl ProgramTest {
|
|||
this.add_account(
|
||||
program_id,
|
||||
Account {
|
||||
lamports: Rent::default().minimum_balance(data.len()).min(1),
|
||||
lamports: Rent::default().minimum_balance(data.len()).max(1),
|
||||
data,
|
||||
owner: solana_sdk::bpf_loader::id(),
|
||||
executable: true,
|
||||
|
|
|
@ -40,7 +40,7 @@ pub fn spl_programs(rent: &Rent) -> Vec<(Pubkey, AccountSharedData)> {
|
|||
(
|
||||
*program_id,
|
||||
AccountSharedData::from(Account {
|
||||
lamports: rent.minimum_balance(elf.len()).min(1),
|
||||
lamports: rent.minimum_balance(elf.len()).max(1),
|
||||
data: elf.to_vec(),
|
||||
owner: solana_sdk::bpf_loader::id(),
|
||||
executable: true,
|
||||
|
|
Loading…
Reference in New Issue