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(
|
this.add_account(
|
||||||
program_id,
|
program_id,
|
||||||
Account {
|
Account {
|
||||||
lamports: Rent::default().minimum_balance(data.len()).min(1),
|
lamports: Rent::default().minimum_balance(data.len()).max(1),
|
||||||
data,
|
data,
|
||||||
owner: solana_sdk::bpf_loader::id(),
|
owner: solana_sdk::bpf_loader::id(),
|
||||||
executable: true,
|
executable: true,
|
||||||
|
|
|
@ -40,7 +40,7 @@ pub fn spl_programs(rent: &Rent) -> Vec<(Pubkey, AccountSharedData)> {
|
||||||
(
|
(
|
||||||
*program_id,
|
*program_id,
|
||||||
AccountSharedData::from(Account {
|
AccountSharedData::from(Account {
|
||||||
lamports: rent.minimum_balance(elf.len()).min(1),
|
lamports: rent.minimum_balance(elf.len()).max(1),
|
||||||
data: elf.to_vec(),
|
data: elf.to_vec(),
|
||||||
owner: solana_sdk::bpf_loader::id(),
|
owner: solana_sdk::bpf_loader::id(),
|
||||||
executable: true,
|
executable: true,
|
||||||
|
|
Loading…
Reference in New Issue