@@ -328,7 +328,7 @@ impl<Cost: CostType> Interpreter<Cost> {
328
328
let contract_code = self . mem . read_slice ( init_off, init_size) ;
329
329
let can_create = ext. balance ( & params. address ) ? >= endowment && ext. depth ( ) < ext. schedule ( ) . max_depth ;
330
330
331
- // clear return data buffer before crearing new call frame.
331
+ // clear return data buffer before creating new call frame.
332
332
self . return_data = ReturnData :: empty ( ) ;
333
333
334
334
if !can_create {
@@ -368,8 +368,7 @@ impl<Cost: CostType> Interpreter<Cost> {
368
368
None
369
369
} else if instruction == instructions:: STATICCALL {
370
370
Some ( U256 :: zero ( ) )
371
- }
372
- else {
371
+ } else {
373
372
Some ( stack. pop_back ( ) )
374
373
} ;
375
374
@@ -390,11 +389,11 @@ impl<Cost: CostType> Interpreter<Cost> {
390
389
if ext. is_static ( ) && value. map_or ( false , |v| !v. is_zero ( ) ) {
391
390
return Err ( vm:: Error :: MutableCallInStaticContext ) ;
392
391
}
393
- let has_balance = ext. balance ( & params. address ) ? >= value. expect ( "value set for all but delegate call and staticcall ; qed" ) ;
392
+ let has_balance = ext. balance ( & params. address ) ? >= value. expect ( "value set for all but delegate call; qed" ) ;
394
393
( & params. address , & code_address, has_balance, CallType :: Call )
395
394
} ,
396
395
instructions:: CALLCODE => {
397
- let has_balance = ext. balance ( & params. address ) ? >= value. expect ( "value set for all but delegate call and staticcall ; qed" ) ;
396
+ let has_balance = ext. balance ( & params. address ) ? >= value. expect ( "value set for all but delegate call; qed" ) ;
398
397
( & params. address , & params. address , has_balance, CallType :: CallCode )
399
398
} ,
400
399
instructions:: DELEGATECALL => ( & params. sender , & params. address , true , CallType :: DelegateCall ) ,
@@ -423,12 +422,12 @@ impl<Cost: CostType> Interpreter<Cost> {
423
422
MessageCallResult :: Success ( gas_left, data) => {
424
423
stack. push ( U256 :: one ( ) ) ;
425
424
self . return_data = data;
426
- Ok ( InstructionResult :: UnusedGas ( Cost :: from_u256 ( gas_left) . expect ( "Gas left cannot be greater then current one" ) ) )
425
+ Ok ( InstructionResult :: UnusedGas ( Cost :: from_u256 ( gas_left) . expect ( "Gas left cannot be greater than current one" ) ) )
427
426
} ,
428
427
MessageCallResult :: Reverted ( gas_left, data) => {
429
428
stack. push ( U256 :: zero ( ) ) ;
430
429
self . return_data = data;
431
- Ok ( InstructionResult :: UnusedGas ( Cost :: from_u256 ( gas_left) . expect ( "Gas left cannot be greater then current one" ) ) )
430
+ Ok ( InstructionResult :: UnusedGas ( Cost :: from_u256 ( gas_left) . expect ( "Gas left cannot be greater than current one" ) ) )
432
431
} ,
433
432
MessageCallResult :: Failed => {
434
433
stack. push ( U256 :: zero ( ) ) ;
0 commit comments