File tree Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -108,12 +108,20 @@ impl Default for InstructionResult {
108108 }
109109}
110110
111- #[ derive( Default ) ]
112111pub struct Config {
113112 pub panic : bool ,
114113 pub verbose : bool ,
115114}
116115
116+ impl Default for Config {
117+ fn default ( ) -> Self {
118+ Self {
119+ panic : true ,
120+ verbose : false ,
121+ }
122+ }
123+ }
124+
117125impl InstructionResult {
118126 /// Get an account from the resulting accounts by its pubkey.
119127 pub fn get_account ( & self , pubkey : & Pubkey ) -> Option < & Account > {
Original file line number Diff line number Diff line change @@ -151,7 +151,7 @@ fn test_transfer() {
151151 ] ,
152152 & [
153153 Check :: success ( ) ,
154- Check :: compute_units ( 2504 ) ,
154+ Check :: compute_units ( 2500 ) ,
155155 Check :: account ( & payer)
156156 . lamports ( payer_lamports - transfer_amount)
157157 . build ( ) ,
@@ -209,7 +209,7 @@ fn test_close_account() {
209209 ] ,
210210 & [
211211 Check :: success ( ) ,
212- Check :: compute_units ( 2585 ) ,
212+ Check :: compute_units ( 2581 ) ,
213213 Check :: account ( & key)
214214 . closed ( ) // The rest is unnecessary, just testing.
215215 . data ( & [ ] )
@@ -265,7 +265,7 @@ fn test_cpi() {
265265 & [
266266 // This is the error thrown by SVM. It also emits the message
267267 // "Program is not cached".
268- Check :: err ( ProgramError :: InvalidAccountData ) ,
268+ Check :: instruction_err ( InstructionError :: UnsupportedProgramId ) ,
269269 ] ,
270270 ) ;
271271 }
@@ -329,7 +329,7 @@ fn test_cpi() {
329329 ] ,
330330 & [
331331 Check :: success ( ) ,
332- Check :: compute_units ( 2288 ) ,
332+ Check :: compute_units ( 2289 ) ,
333333 Check :: account ( & key)
334334 . data ( data)
335335 . lamports ( lamports)
You can’t perform that action at this time.
0 commit comments