Skip to content

Commit

Permalink
Fix tx.nonce comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
SamWilsn committed Feb 12, 2025
1 parent af90b19 commit 6ec3749
Show file tree
Hide file tree
Showing 16 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/ethereum/arrow_glacier/transactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def validate_transaction(tx: Transaction) -> bool:
"""
if calculate_intrinsic_cost(tx) > Uint(tx.gas):
return False
if tx.nonce >= U256(U64.MAX_VALUE):
if tx.nonce >= U64.MAX_VALUE:
return False
return True

Expand Down
2 changes: 1 addition & 1 deletion src/ethereum/berlin/transactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def validate_transaction(tx: Transaction) -> bool:
"""
if calculate_intrinsic_cost(tx) > Uint(tx.gas):
return False
if tx.nonce >= U256(U64.MAX_VALUE):
if tx.nonce >= U64.MAX_VALUE:
return False
return True

Expand Down
2 changes: 1 addition & 1 deletion src/ethereum/byzantium/transactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def validate_transaction(tx: Transaction) -> bool:
"""
if calculate_intrinsic_cost(tx) > Uint(tx.gas):
return False
if tx.nonce >= U256(U64.MAX_VALUE):
if tx.nonce >= U64.MAX_VALUE:
return False
return True

Expand Down
2 changes: 1 addition & 1 deletion src/ethereum/cancun/transactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def validate_transaction(tx: Transaction) -> bool:

if calculate_intrinsic_cost(tx) > tx.gas:
return False
if tx.nonce >= U256(U64.MAX_VALUE):
if tx.nonce >= U64.MAX_VALUE:
return False
if tx.to == Bytes0(b"") and len(tx.data) > 2 * MAX_CODE_SIZE:
return False
Expand Down
2 changes: 1 addition & 1 deletion src/ethereum/constantinople/transactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def validate_transaction(tx: Transaction) -> bool:
"""
if calculate_intrinsic_cost(tx) > Uint(tx.gas):
return False
if tx.nonce >= U256(U64.MAX_VALUE):
if tx.nonce >= U64.MAX_VALUE:
return False
return True

Expand Down
2 changes: 1 addition & 1 deletion src/ethereum/dao_fork/transactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def validate_transaction(tx: Transaction) -> bool:
"""
if calculate_intrinsic_cost(tx) > Uint(tx.gas):
return False
if tx.nonce >= U256(U64.MAX_VALUE):
if tx.nonce >= U64.MAX_VALUE:
return False
return True

Expand Down
2 changes: 1 addition & 1 deletion src/ethereum/frontier/transactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def validate_transaction(tx: Transaction) -> bool:
"""
if calculate_intrinsic_cost(tx) > Uint(tx.gas):
return False
if tx.nonce >= U256(U64.MAX_VALUE):
if tx.nonce >= U64.MAX_VALUE:
return False
return True

Expand Down
2 changes: 1 addition & 1 deletion src/ethereum/gray_glacier/transactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def validate_transaction(tx: Transaction) -> bool:
"""
if calculate_intrinsic_cost(tx) > Uint(tx.gas):
return False
if tx.nonce >= U256(U64.MAX_VALUE):
if tx.nonce >= U64.MAX_VALUE:
return False
return True

Expand Down
2 changes: 1 addition & 1 deletion src/ethereum/homestead/transactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def validate_transaction(tx: Transaction) -> bool:
"""
if calculate_intrinsic_cost(tx) > Uint(tx.gas):
return False
if tx.nonce >= U256(U64.MAX_VALUE):
if tx.nonce >= U64.MAX_VALUE:
return False
return True

Expand Down
2 changes: 1 addition & 1 deletion src/ethereum/istanbul/transactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def validate_transaction(tx: Transaction) -> bool:
"""
if calculate_intrinsic_cost(tx) > Uint(tx.gas):
return False
if tx.nonce >= U256(U64.MAX_VALUE):
if tx.nonce >= U64.MAX_VALUE:
return False
return True

Expand Down
2 changes: 1 addition & 1 deletion src/ethereum/london/transactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def validate_transaction(tx: Transaction) -> bool:
"""
if calculate_intrinsic_cost(tx) > Uint(tx.gas):
return False
if tx.nonce >= U256(U64.MAX_VALUE):
if tx.nonce >= U64.MAX_VALUE:
return False
return True

Expand Down
2 changes: 1 addition & 1 deletion src/ethereum/muir_glacier/transactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def validate_transaction(tx: Transaction) -> bool:
"""
if calculate_intrinsic_cost(tx) > Uint(tx.gas):
return False
if tx.nonce >= U256(U64.MAX_VALUE):
if tx.nonce >= U64.MAX_VALUE:
return False
return True

Expand Down
2 changes: 1 addition & 1 deletion src/ethereum/paris/transactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def validate_transaction(tx: Transaction) -> bool:
"""
if calculate_intrinsic_cost(tx) > tx.gas:
return False
if tx.nonce >= U256(U64.MAX_VALUE):
if tx.nonce >= U64.MAX_VALUE:
return False
return True

Expand Down
2 changes: 1 addition & 1 deletion src/ethereum/shanghai/transactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def validate_transaction(tx: Transaction) -> bool:

if calculate_intrinsic_cost(tx) > tx.gas:
return False
if tx.nonce >= U256(U64.MAX_VALUE):
if tx.nonce >= U64.MAX_VALUE:
return False
if tx.to == Bytes0(b"") and len(tx.data) > 2 * MAX_CODE_SIZE:
return False
Expand Down
2 changes: 1 addition & 1 deletion src/ethereum/spurious_dragon/transactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def validate_transaction(tx: Transaction) -> bool:
"""
if calculate_intrinsic_cost(tx) > Uint(tx.gas):
return False
if tx.nonce >= U256(U64.MAX_VALUE):
if tx.nonce >= U64.MAX_VALUE:
return False
return True

Expand Down
2 changes: 1 addition & 1 deletion src/ethereum/tangerine_whistle/transactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def validate_transaction(tx: Transaction) -> bool:
"""
if calculate_intrinsic_cost(tx) > Uint(tx.gas):
return False
if tx.nonce >= U256(U64.MAX_VALUE):
if tx.nonce >= U64.MAX_VALUE:
return False
return True

Expand Down

0 comments on commit 6ec3749

Please sign in to comment.