Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Commit

Permalink
manually backport #34722 to fix a test
Browse files Browse the repository at this point in the history
  • Loading branch information
HaoranYi committed Feb 10, 2024
1 parent b3603cb commit d44ee2b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion runtime/src/loader_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ pub fn load_upgradeable_buffer<T: Client>(
let program = load_program_from_file(name);
let buffer_pubkey = buffer_keypair.pubkey();
let buffer_authority_pubkey = buffer_authority_keypair.pubkey();
let program_buffer_bytes = UpgradeableLoaderState::size_of_buffer(program.len());

bank_client
.send_and_confirm_message(
Expand All @@ -127,7 +128,7 @@ pub fn load_upgradeable_buffer<T: Client>(
&buffer_authority_pubkey,
1.max(
bank_client
.get_minimum_balance_for_rent_exemption(program.len())
.get_minimum_balance_for_rent_exemption(program_buffer_bytes)
.unwrap(),
),
program.len(),
Expand Down

0 comments on commit d44ee2b

Please sign in to comment.