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

Bank: Add function to replace empty account with upgradeable program on feature activation #32783

Merged
merged 33 commits into from
Oct 4, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
4ab4bf1
replace program account
buffalojoec Aug 9, 2023
fb1d4c9
modify for all cases
buffalojoec Aug 16, 2023
99eb96e
remove non-data swap
buffalojoec Aug 17, 2023
acbca38
address tests & conditional feedback
buffalojoec Aug 18, 2023
a8800b8
get the rent involved
buffalojoec Aug 18, 2023
86833f9
mix in owner & executable
buffalojoec Aug 18, 2023
637dd83
feature-related cases
buffalojoec Aug 18, 2023
e6bfb43
stripped back to feature-specific case only
buffalojoec Aug 18, 2023
24e75d5
added feature
buffalojoec Aug 18, 2023
a573a97
address initial feedback
buffalojoec Aug 21, 2023
c221038
added more lamport checks
buffalojoec Aug 21, 2023
b36f56a
condense tests
buffalojoec Aug 21, 2023
9a61900
using test_case
buffalojoec Aug 21, 2023
67986b4
add fail cases to tests
buffalojoec Aug 21, 2023
453dc8a
more cleanup
buffalojoec Aug 22, 2023
7d3f877
add verifiably built program
buffalojoec Aug 22, 2023
a6dd68e
update program account state
buffalojoec Aug 22, 2023
59a4132
cleaned up serializing logic
buffalojoec Aug 23, 2023
acfa993
use full word capitalization
buffalojoec Sep 15, 2023
6ef8353
rename old & new to dst & src
buffalojoec Sep 15, 2023
069dd53
swap src and dst in parameters
buffalojoec Sep 15, 2023
f044890
add warnings and errors
buffalojoec Sep 15, 2023
1e7b4e5
rename feature to programify
buffalojoec Sep 20, 2023
251b9a9
test suite description clarity
buffalojoec Sep 20, 2023
1b37cdc
remove strings from datapoints
buffalojoec Sep 20, 2023
5b280fd
spell out source and destination
buffalojoec Sep 29, 2023
6ccf0f1
more verbose comments in account replace functions
buffalojoec Sep 29, 2023
0392ad8
move lamport calculation
buffalojoec Sep 29, 2023
41c9c40
swap lamport check for state check
buffalojoec Sep 29, 2023
5cadf5b
move replace functions to helper module
buffalojoec Sep 29, 2023
3e7dc30
make replace_account methods fallible
buffalojoec Oct 3, 2023
19b35de
refactor error handling
buffalojoec Oct 4, 2023
91bfec7
add test for source program state
buffalojoec Oct 4, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
mix in owner & executable
  • Loading branch information
buffalojoec committed Oct 4, 2023
commit 86833f9f5f32e5530b4518d275a4bdb925f0f67a
2 changes: 1 addition & 1 deletion runtime/src/bank.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8266,7 +8266,7 @@ impl Bank {
let account = Account {
lamports,
data,
..Account::from(old_account.clone())
..Account::from(new_account.clone())
};
self.store_account(old_address, &account);
new_account.lamports() + old_account.lamports() - account.lamports
Expand Down
Loading