@@ -344,7 +344,7 @@ def vm_execute(ext, msg, code):
344
344
stk .append (utils .coerce_to_int (msg .to ))
345
345
elif op == 'BALANCE' :
346
346
# EIP150: Increase the gas cost of BALANCE to 400
347
- if ext .post_anti_dos_hardfork () :
347
+ if ext .post_anti_dos_hardfork :
348
348
if not eat_gas (compustate , opcodes .BALANCE_SUPPLEMENTAL_GAS ):
349
349
return vm_exception ("OUT OF GAS" )
350
350
addr = utils .coerce_addr_to_hex (stk .pop () % 2 ** 160 )
@@ -383,14 +383,14 @@ def vm_execute(ext, msg, code):
383
383
stk .append (ext .tx_gasprice )
384
384
elif op == 'EXTCODESIZE' :
385
385
# EIP150: Increase the gas cost of EXTCODESIZE to 700
386
- if ext .post_anti_dos_hardfork () :
386
+ if ext .post_anti_dos_hardfork :
387
387
if not eat_gas (compustate , opcodes .EXTCODELOAD_SUPPLEMENTAL_GAS ):
388
388
return vm_exception ("OUT OF GAS" )
389
389
addr = utils .coerce_addr_to_hex (stk .pop () % 2 ** 160 )
390
390
stk .append (len (ext .get_code (addr ) or b'' ))
391
391
elif op == 'EXTCODECOPY' :
392
392
# EIP150: Increase the base gas cost of EXTCODECOPY to 700
393
- if ext .post_anti_dos_hardfork () :
393
+ if ext .post_anti_dos_hardfork :
394
394
if not eat_gas (compustate , opcodes .EXTCODELOAD_SUPPLEMENTAL_GAS ):
395
395
return vm_exception ("OUT OF GAS" )
396
396
addr = utils .coerce_addr_to_hex (stk .pop () % 2 ** 160 )
@@ -443,7 +443,7 @@ def vm_execute(ext, msg, code):
443
443
mem [s0 ] = s1 % 256
444
444
elif op == 'SLOAD' :
445
445
# EIP150: Increase the gas cost of SLOAD to 200
446
- if ext .post_anti_dos_hardfork () :
446
+ if ext .post_anti_dos_hardfork :
447
447
if not eat_gas (compustate , opcodes .SLOAD_SUPPLEMENTAL_GAS ):
448
448
return vm_exception ("OUT OF GAS" )
449
449
stk .append (ext .get_storage_data (msg .to , stk .pop ()))
@@ -526,7 +526,7 @@ def vm_execute(ext, msg, code):
526
526
ingas = compustate .gas
527
527
# EIP150(1b) CREATE only provides all but one 64th of the
528
528
# parent gas to the child call
529
- if ext .post_anti_dos_hardfork () :
529
+ if ext .post_anti_dos_hardfork :
530
530
ingas = max_call_gas (ingas )
531
531
532
532
create_msg = Message (msg .to , b'' , value , ingas , cd , msg .depth + 1 )
@@ -549,10 +549,10 @@ def vm_execute(ext, msg, code):
549
549
to = ((b'\x00 ' * (32 - len (to ))) + to )[12 :]
550
550
extra_gas = (not ext .account_exists (to )) * opcodes .GCALLNEWACCOUNT + \
551
551
(value > 0 ) * opcodes .GCALLVALUETRANSFER + \
552
- ext .post_anti_dos_hardfork () * opcodes .CALL_SUPPLEMENTAL_GAS
552
+ ext .post_anti_dos_hardfork * opcodes .CALL_SUPPLEMENTAL_GAS
553
553
# ^ EIP150 Increase the gas cost of CALL to 700
554
554
555
- if ext .post_anti_dos_hardfork () :
555
+ if ext .post_anti_dos_hardfork :
556
556
# EIP150(1b) if a call asks for more gas than all but one 64th of
557
557
# the maximum allowed amount, call with all but one 64th of the
558
558
# maximum allowed amount of gas
@@ -592,10 +592,10 @@ def vm_execute(ext, msg, code):
592
592
not mem_extend (mem , compustate , op , memoutstart , memoutsz ):
593
593
return vm_exception ('OOG EXTENDING MEMORY' )
594
594
extra_gas = (value > 0 ) * opcodes .GCALLVALUETRANSFER + \
595
- ext .post_anti_dos_hardfork () * opcodes .CALL_SUPPLEMENTAL_GAS
595
+ ext .post_anti_dos_hardfork * opcodes .CALL_SUPPLEMENTAL_GAS
596
596
# ^ EIP150 Increase the gas cost of CALLCODE, DELEGATECALL to 700
597
597
598
- if ext .post_anti_dos_hardfork () :
598
+ if ext .post_anti_dos_hardfork :
599
599
# EIP150(1b) if a call asks for more gas than all but one 64th of
600
600
# the maximum allowed amount, call with all but one 64th of the
601
601
# maximum allowed amount of gas
@@ -612,7 +612,7 @@ def vm_execute(ext, msg, code):
612
612
to = utils .encode_int (to )
613
613
to = ((b'\x00 ' * (32 - len (to ))) + to )[12 :]
614
614
cd = CallData (mem , meminstart , meminsz )
615
- if ext .post_homestead_hardfork () and op == 'DELEGATECALL' :
615
+ if ext .post_homestead_hardfork and op == 'DELEGATECALL' :
616
616
call_msg = Message (msg .sender , msg .to , msg .value , submsg_gas , cd ,
617
617
msg .depth + 1 , code_address = to , transfers_value = False )
618
618
elif op == 'DELEGATECALL' :
@@ -640,7 +640,7 @@ def vm_execute(ext, msg, code):
640
640
to = utils .encode_int (stk .pop ())
641
641
to = ((b'\x00 ' * (32 - len (to ))) + to )[12 :]
642
642
643
- if ext .post_anti_dos_hardfork () :
643
+ if ext .post_anti_dos_hardfork :
644
644
# EIP150 Increase the gas cost of SUICIDE to 5000
645
645
extra_gas = opcodes .SUICIDE_SUPPLEMENTAL_GAS + \
646
646
(not ext .account_exists (to )) * opcodes .GCALLNEWACCOUNT
0 commit comments