TestValidator nits (#30410)

* nit: remove erroneous comment

* nit: use max for program account lamports
This commit is contained in:
Tyera 2023-02-20 16:24:29 -07:00 committed by GitHub
parent 47777c47bf
commit b0009a3203
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -481,7 +481,6 @@ impl TestValidatorGenesis {
}
/// Add a list of programs to the test environment.
///pub fn add_programs_with_path<'a>(&'a mut self, programs: &[ProgramInfo]) -> &'a mut Self {
pub fn add_programs_with_path(&mut self, programs: &[ProgramInfo]) -> &mut Self {
for program in programs {
self.programs.push(program.clone());
@ -665,7 +664,7 @@ impl TestValidator {
accounts.insert(
program.program_id,
AccountSharedData::from(Account {
lamports: Rent::default().minimum_balance(data.len()).min(1),
lamports: Rent::default().minimum_balance(data.len()).max(1),
data,
owner: program.loader,
executable: true,