diff --git a/program-test/src/lib.rs b/program-test/src/lib.rs index b41bd5db22..105cba8a44 100644 --- a/program-test/src/lib.rs +++ b/program-test/src/lib.rs @@ -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, diff --git a/program-test/src/programs.rs b/program-test/src/programs.rs index f7e2c7e14e..4eacd00139 100644 --- a/program-test/src/programs.rs +++ b/program-test/src/programs.rs @@ -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,