@@ -146,10 +146,7 @@ impl AccountDumper for AccountDumperBank {
146146 . map_err ( AccountDumperError :: MutatorModificationError ) ?;
147147 let program_idl_modification =
148148 program_idl. map ( |( program_idl_pubkey, program_idl_account) | {
149- AccountModification :: from ( (
150- & program_idl_pubkey,
151- & program_idl_account,
152- ) )
149+ from_account ( program_idl_pubkey, & program_idl_account)
153150 } ) ;
154151 let needs_upgrade = self . bank . has_account ( program_id_pubkey) ;
155152 let transaction = transaction_to_clone_program (
@@ -180,7 +177,7 @@ impl AccountDumper for AccountDumperBank {
180177 ) ;
181178
182179 let mut program_id_modification =
183- AccountModification :: from ( ( program_pubkey, program_account) ) ;
180+ from_account ( * program_pubkey, program_account) ;
184181 // point program account to the derived program data account address
185182 let program_id_state =
186183 bincode:: serialize ( & UpgradeableLoaderState :: Program {
@@ -211,3 +208,14 @@ impl AccountDumper for AccountDumperBank {
211208 self . execute_transaction ( transaction)
212209 }
213210}
211+
212+ fn from_account ( pubkey : Pubkey , account : & Account ) -> AccountModification {
213+ AccountModification {
214+ pubkey,
215+ lamports : Some ( account. lamports ) ,
216+ owner : Some ( account. owner ) ,
217+ executable : Some ( account. executable ) ,
218+ data : Some ( account. data . clone ( ) ) ,
219+ rent_epoch : Some ( account. rent_epoch ) ,
220+ }
221+ }
0 commit comments