Skip to content

Commit

Permalink
move lamport calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
buffalojoec committed Oct 3, 2023
1 parent 015f0f3 commit b93957d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions runtime/src/bank.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8314,13 +8314,11 @@ impl Bank {
.get_account_with_fixed_root(destination_address)
.is_none()
{
let lamports = self.get_minimum_balance_for_rent_exemption(
UpgradeableLoaderState::size_of_program(),
);
let state = UpgradeableLoaderState::Program {
programdata_address: destination_data_address,
};
if let Ok(data) = bincode::serialize(&state) {
let lamports = self.get_minimum_balance_for_rent_exemption(data.len());
let created_program_account = Account {
lamports,
data,
Expand Down

0 comments on commit b93957d

Please sign in to comment.