From c923da6587bb1cf4828c3228290953f29c494583 Mon Sep 17 00:00:00 2001 From: Sam Wilson Date: Fri, 26 Apr 2024 20:00:34 -0400 Subject: [PATCH] Clean up conditionals in vm/instructions/log.py --- src/ethereum/arrow_glacier/vm/instructions/log.py | 2 +- src/ethereum/berlin/vm/instructions/log.py | 2 +- src/ethereum/byzantium/vm/instructions/log.py | 2 +- src/ethereum/cancun/vm/instructions/log.py | 2 +- src/ethereum/constantinople/vm/instructions/log.py | 2 +- src/ethereum/gray_glacier/vm/instructions/log.py | 2 +- src/ethereum/istanbul/vm/instructions/log.py | 2 +- src/ethereum/london/vm/instructions/log.py | 2 +- src/ethereum/muir_glacier/vm/instructions/log.py | 2 +- src/ethereum/paris/vm/instructions/log.py | 2 +- src/ethereum/shanghai/vm/instructions/log.py | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/ethereum/arrow_glacier/vm/instructions/log.py b/src/ethereum/arrow_glacier/vm/instructions/log.py index 4f145f6391..ced8461e4a 100644 --- a/src/ethereum/arrow_glacier/vm/instructions/log.py +++ b/src/ethereum/arrow_glacier/vm/instructions/log.py @@ -67,7 +67,7 @@ def log_n(evm: Evm, num_topics: U256) -> None: # OPERATION evm.memory += b"\x00" * extend_memory.expand_by - if not (not evm.message.is_static): + if evm.message.is_static: raise WriteInStaticContext log_entry = Log( address=evm.message.current_target, diff --git a/src/ethereum/berlin/vm/instructions/log.py b/src/ethereum/berlin/vm/instructions/log.py index 4f145f6391..ced8461e4a 100644 --- a/src/ethereum/berlin/vm/instructions/log.py +++ b/src/ethereum/berlin/vm/instructions/log.py @@ -67,7 +67,7 @@ def log_n(evm: Evm, num_topics: U256) -> None: # OPERATION evm.memory += b"\x00" * extend_memory.expand_by - if not (not evm.message.is_static): + if evm.message.is_static: raise WriteInStaticContext log_entry = Log( address=evm.message.current_target, diff --git a/src/ethereum/byzantium/vm/instructions/log.py b/src/ethereum/byzantium/vm/instructions/log.py index 4f145f6391..ced8461e4a 100644 --- a/src/ethereum/byzantium/vm/instructions/log.py +++ b/src/ethereum/byzantium/vm/instructions/log.py @@ -67,7 +67,7 @@ def log_n(evm: Evm, num_topics: U256) -> None: # OPERATION evm.memory += b"\x00" * extend_memory.expand_by - if not (not evm.message.is_static): + if evm.message.is_static: raise WriteInStaticContext log_entry = Log( address=evm.message.current_target, diff --git a/src/ethereum/cancun/vm/instructions/log.py b/src/ethereum/cancun/vm/instructions/log.py index 4f145f6391..ced8461e4a 100644 --- a/src/ethereum/cancun/vm/instructions/log.py +++ b/src/ethereum/cancun/vm/instructions/log.py @@ -67,7 +67,7 @@ def log_n(evm: Evm, num_topics: U256) -> None: # OPERATION evm.memory += b"\x00" * extend_memory.expand_by - if not (not evm.message.is_static): + if evm.message.is_static: raise WriteInStaticContext log_entry = Log( address=evm.message.current_target, diff --git a/src/ethereum/constantinople/vm/instructions/log.py b/src/ethereum/constantinople/vm/instructions/log.py index 4f145f6391..ced8461e4a 100644 --- a/src/ethereum/constantinople/vm/instructions/log.py +++ b/src/ethereum/constantinople/vm/instructions/log.py @@ -67,7 +67,7 @@ def log_n(evm: Evm, num_topics: U256) -> None: # OPERATION evm.memory += b"\x00" * extend_memory.expand_by - if not (not evm.message.is_static): + if evm.message.is_static: raise WriteInStaticContext log_entry = Log( address=evm.message.current_target, diff --git a/src/ethereum/gray_glacier/vm/instructions/log.py b/src/ethereum/gray_glacier/vm/instructions/log.py index 4f145f6391..ced8461e4a 100644 --- a/src/ethereum/gray_glacier/vm/instructions/log.py +++ b/src/ethereum/gray_glacier/vm/instructions/log.py @@ -67,7 +67,7 @@ def log_n(evm: Evm, num_topics: U256) -> None: # OPERATION evm.memory += b"\x00" * extend_memory.expand_by - if not (not evm.message.is_static): + if evm.message.is_static: raise WriteInStaticContext log_entry = Log( address=evm.message.current_target, diff --git a/src/ethereum/istanbul/vm/instructions/log.py b/src/ethereum/istanbul/vm/instructions/log.py index 4f145f6391..ced8461e4a 100644 --- a/src/ethereum/istanbul/vm/instructions/log.py +++ b/src/ethereum/istanbul/vm/instructions/log.py @@ -67,7 +67,7 @@ def log_n(evm: Evm, num_topics: U256) -> None: # OPERATION evm.memory += b"\x00" * extend_memory.expand_by - if not (not evm.message.is_static): + if evm.message.is_static: raise WriteInStaticContext log_entry = Log( address=evm.message.current_target, diff --git a/src/ethereum/london/vm/instructions/log.py b/src/ethereum/london/vm/instructions/log.py index 4f145f6391..ced8461e4a 100644 --- a/src/ethereum/london/vm/instructions/log.py +++ b/src/ethereum/london/vm/instructions/log.py @@ -67,7 +67,7 @@ def log_n(evm: Evm, num_topics: U256) -> None: # OPERATION evm.memory += b"\x00" * extend_memory.expand_by - if not (not evm.message.is_static): + if evm.message.is_static: raise WriteInStaticContext log_entry = Log( address=evm.message.current_target, diff --git a/src/ethereum/muir_glacier/vm/instructions/log.py b/src/ethereum/muir_glacier/vm/instructions/log.py index 4f145f6391..ced8461e4a 100644 --- a/src/ethereum/muir_glacier/vm/instructions/log.py +++ b/src/ethereum/muir_glacier/vm/instructions/log.py @@ -67,7 +67,7 @@ def log_n(evm: Evm, num_topics: U256) -> None: # OPERATION evm.memory += b"\x00" * extend_memory.expand_by - if not (not evm.message.is_static): + if evm.message.is_static: raise WriteInStaticContext log_entry = Log( address=evm.message.current_target, diff --git a/src/ethereum/paris/vm/instructions/log.py b/src/ethereum/paris/vm/instructions/log.py index 4f145f6391..ced8461e4a 100644 --- a/src/ethereum/paris/vm/instructions/log.py +++ b/src/ethereum/paris/vm/instructions/log.py @@ -67,7 +67,7 @@ def log_n(evm: Evm, num_topics: U256) -> None: # OPERATION evm.memory += b"\x00" * extend_memory.expand_by - if not (not evm.message.is_static): + if evm.message.is_static: raise WriteInStaticContext log_entry = Log( address=evm.message.current_target, diff --git a/src/ethereum/shanghai/vm/instructions/log.py b/src/ethereum/shanghai/vm/instructions/log.py index 4f145f6391..ced8461e4a 100644 --- a/src/ethereum/shanghai/vm/instructions/log.py +++ b/src/ethereum/shanghai/vm/instructions/log.py @@ -67,7 +67,7 @@ def log_n(evm: Evm, num_topics: U256) -> None: # OPERATION evm.memory += b"\x00" * extend_memory.expand_by - if not (not evm.message.is_static): + if evm.message.is_static: raise WriteInStaticContext log_entry = Log( address=evm.message.current_target,