1010 state:: { get_program_data_address, UpgradeableLoaderState } ,
1111 } ,
1212 solana_sdk:: {
13- account:: { AccountSharedData , WritableAccount } ,
13+ account:: { Account , WritableAccount } ,
1414 program_error:: ProgramError ,
1515 pubkey:: Pubkey ,
1616 } ,
@@ -24,10 +24,7 @@ fn fail_recipient_same_as_close_account() {
2424
2525 mollusk. process_and_validate_instruction (
2626 & close ( & target, & target, None , None ) ,
27- & [
28- ( target, AccountSharedData :: default ( ) ) ,
29- ( target, AccountSharedData :: default ( ) ) ,
30- ] ,
27+ & [ ( target, Account :: default ( ) ) , ( target, Account :: default ( ) ) ] ,
3128 & [ Check :: err ( ProgramError :: InvalidArgument ) ] ,
3229 ) ;
3330}
@@ -53,7 +50,7 @@ fn fail_invalid_account_state() {
5350 true ,
5451 ) ,
5552 ) ,
56- ( destination, AccountSharedData :: default ( ) ) ,
53+ ( destination, Account :: default ( ) ) ,
5754 ] ,
5855 & [ Check :: err ( ProgramError :: InvalidArgument ) ] ,
5956 ) ;
@@ -78,7 +75,7 @@ fn uninitialized_success() {
7875 target,
7976 upgradeable_state_account ( & UpgradeableLoaderState :: Uninitialized , & [ ] , false ) ,
8077 ) ,
81- ( destination, AccountSharedData :: default ( ) ) ,
78+ ( destination, Account :: default ( ) ) ,
8279 ] ,
8380 & [
8481 Check :: success ( ) ,
@@ -116,8 +113,8 @@ fn buffer_fail_buffer_immutable() {
116113 false ,
117114 ) ,
118115 ) ,
119- ( destination, AccountSharedData :: default ( ) ) ,
120- ( authority, AccountSharedData :: default ( ) ) ,
116+ ( destination, Account :: default ( ) ) ,
117+ ( authority, Account :: default ( ) ) ,
121118 ] ,
122119 & [ Check :: err ( ProgramError :: Immutable ) ] ,
123120 ) ;
@@ -144,8 +141,8 @@ fn buffer_fail_incorrect_authority() {
144141 false ,
145142 ) ,
146143 ) ,
147- ( destination, AccountSharedData :: default ( ) ) ,
148- ( authority, AccountSharedData :: default ( ) ) ,
144+ ( destination, Account :: default ( ) ) ,
145+ ( authority, Account :: default ( ) ) ,
149146 ] ,
150147 & [ Check :: err ( ProgramError :: IncorrectAuthority ) ] ,
151148 ) ;
@@ -175,8 +172,8 @@ fn buffer_fail_authority_not_signer() {
175172 false ,
176173 ) ,
177174 ) ,
178- ( destination, AccountSharedData :: default ( ) ) ,
179- ( authority, AccountSharedData :: default ( ) ) ,
175+ ( destination, Account :: default ( ) ) ,
176+ ( authority, Account :: default ( ) ) ,
180177 ] ,
181178 & [ Check :: err ( ProgramError :: MissingRequiredSignature ) ] ,
182179 ) ;
@@ -208,12 +205,12 @@ fn buffer_success() {
208205 false ,
209206 ) ,
210207 ) ,
211- ( destination, AccountSharedData :: default ( ) ) ,
212- ( authority, AccountSharedData :: default ( ) ) ,
208+ ( destination, Account :: default ( ) ) ,
209+ ( authority, Account :: default ( ) ) ,
213210 ] ,
214211 & [
215212 Check :: success ( ) ,
216- Check :: compute_units ( 12_792 ) ,
213+ Check :: compute_units ( 3_628 ) ,
217214 // Closed, but still owned by the loader.
218215 Check :: account ( & buffer)
219216 . data ( & [ 0 , 0 , 0 , 0 ] ) // Size of Uninitialized.
@@ -254,8 +251,8 @@ fn programdata_fail_program_not_writable() {
254251 false ,
255252 ) ,
256253 ) ,
257- ( destination, AccountSharedData :: default ( ) ) ,
258- ( authority, AccountSharedData :: default ( ) ) ,
254+ ( destination, Account :: default ( ) ) ,
255+ ( authority, Account :: default ( ) ) ,
259256 (
260257 program,
261258 upgradeable_state_account (
@@ -304,8 +301,8 @@ fn programdata_fail_program_not_owned_by_loader() {
304301 false ,
305302 ) ,
306303 ) ,
307- ( destination, AccountSharedData :: default ( ) ) ,
308- ( authority, AccountSharedData :: default ( ) ) ,
304+ ( destination, Account :: default ( ) ) ,
305+ ( authority, Account :: default ( ) ) ,
309306 ( program, program_account) ,
310307 ] ,
311308 & [ Check :: err ( ProgramError :: IncorrectProgramId ) ] ,
@@ -337,8 +334,8 @@ fn programdata_fail_program_deployed_in_slot() {
337334 false ,
338335 ) ,
339336 ) ,
340- ( destination, AccountSharedData :: default ( ) ) ,
341- ( authority, AccountSharedData :: default ( ) ) ,
337+ ( destination, Account :: default ( ) ) ,
338+ ( authority, Account :: default ( ) ) ,
342339 (
343340 program,
344341 upgradeable_state_account (
@@ -379,8 +376,8 @@ fn programdata_fail_not_upgradeable() {
379376 false ,
380377 ) ,
381378 ) ,
382- ( destination, AccountSharedData :: default ( ) ) ,
383- ( authority, AccountSharedData :: default ( ) ) ,
379+ ( destination, Account :: default ( ) ) ,
380+ ( authority, Account :: default ( ) ) ,
384381 (
385382 program,
386383 upgradeable_state_account (
@@ -421,8 +418,8 @@ fn programdata_fail_incorrect_authority() {
421418 false ,
422419 ) ,
423420 ) ,
424- ( destination, AccountSharedData :: default ( ) ) ,
425- ( authority, AccountSharedData :: default ( ) ) ,
421+ ( destination, Account :: default ( ) ) ,
422+ ( authority, Account :: default ( ) ) ,
426423 (
427424 program,
428425 upgradeable_state_account (
@@ -466,8 +463,8 @@ fn programdata_fail_authority_not_signer() {
466463 false ,
467464 ) ,
468465 ) ,
469- ( destination, AccountSharedData :: default ( ) ) ,
470- ( authority, AccountSharedData :: default ( ) ) ,
466+ ( destination, Account :: default ( ) ) ,
467+ ( authority, Account :: default ( ) ) ,
471468 (
472469 program,
473470 upgradeable_state_account (
@@ -513,8 +510,8 @@ fn programdata_success() {
513510 false ,
514511 ) ,
515512 ) ,
516- ( destination, AccountSharedData :: default ( ) ) ,
517- ( authority, AccountSharedData :: default ( ) ) ,
513+ ( destination, Account :: default ( ) ) ,
514+ ( authority, Account :: default ( ) ) ,
518515 (
519516 program,
520517 upgradeable_state_account (
@@ -528,7 +525,7 @@ fn programdata_success() {
528525 ] ,
529526 & [
530527 Check :: success ( ) ,
531- Check :: compute_units ( 14_431 ) ,
528+ Check :: compute_units ( 4_995 ) ,
532529 // Closed, but still owned by the loader.
533530 Check :: account ( & programdata)
534531 . data ( & [ 0 , 0 , 0 , 0 ] ) // Size of Uninitialized.
0 commit comments