File tree Expand file tree Collapse file tree 2 files changed +7
-12
lines changed
programs/system/src/instructions Expand file tree Collapse file tree 2 files changed +7
-12
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ mod create_account_with_seed;
99mod initialize_nonce_account;
1010mod transfer;
1111mod transfer_with_seed;
12- mod update_nonce_account ;
12+ mod upgrade_nonce_account ;
1313mod withdraw_nonce_account;
1414
1515pub use advance_nonce_account:: * ;
@@ -23,5 +23,5 @@ pub use create_account_with_seed::*;
2323pub use initialize_nonce_account:: * ;
2424pub use transfer:: * ;
2525pub use transfer_with_seed:: * ;
26- pub use update_nonce_account :: * ;
26+ pub use upgrade_nonce_account :: * ;
2727pub use withdraw_nonce_account:: * ;
Original file line number Diff line number Diff line change 11use pinocchio:: {
22 account_info:: AccountInfo ,
3- instruction :: { AccountMeta , Instruction , Signer } ,
4- program :: invoke_signed ,
3+ cpi :: invoke ,
4+ instruction :: { AccountMeta , Instruction } ,
55 ProgramResult ,
66} ;
77
@@ -10,19 +10,14 @@ use pinocchio::{
1010///
1111/// ### Accounts:
1212/// 0. `[WRITE]` Nonce account
13- pub struct UpdateNonceAccount < ' a > {
13+ pub struct UpgradeNonceAccount < ' a > {
1414 /// Nonce account.
1515 pub account : & ' a AccountInfo ,
1616}
1717
18- impl UpdateNonceAccount < ' _ > {
18+ impl UpgradeNonceAccount < ' _ > {
1919 #[ inline( always) ]
2020 pub fn invoke ( & self ) -> ProgramResult {
21- self . invoke_signed ( & [ ] )
22- }
23-
24- #[ inline( always) ]
25- pub fn invoke_signed ( & self , signers : & [ Signer ] ) -> ProgramResult {
2621 // account metadata
2722 let account_metas: [ AccountMeta ; 1 ] = [ AccountMeta :: writable ( self . account . key ( ) ) ] ;
2823
@@ -33,6 +28,6 @@ impl UpdateNonceAccount<'_> {
3328 data : & [ 12 ] ,
3429 } ;
3530
36- invoke_signed ( & instruction, & [ self . account ] , signers )
31+ invoke ( & instruction, & [ self . account ] )
3732 }
3833}
You can’t perform that action at this time.
0 commit comments