diff --git a/src/halmos/sevm.py b/src/halmos/sevm.py index 9971120d..1af22ed5 100644 --- a/src/halmos/sevm.py +++ b/src/halmos/sevm.py @@ -2072,7 +2072,7 @@ def mk_storagedata(self) -> StorageData: return self.storage_model.mk_storagedata() def sload(self, ex: Exec, addr: Any, loc: Word, transient: bool = False) -> Word: - storage = ex.storage if not transient else ex.transient_storage + storage = ex.transient_storage if transient else ex.storage val = self.storage_model.load(ex, storage, addr, loc) ex.context.trace.append(StorageRead(addr, loc, val, transient)) return val @@ -2080,7 +2080,7 @@ def sload(self, ex: Exec, addr: Any, loc: Word, transient: bool = False) -> Word def sstore( self, ex: Exec, addr: Any, loc: Any, val: Any, transient: bool = False ) -> None: - storage = ex.storage if not transient else ex.transient_storage + storage = ex.transient_storage if transient else ex.storage ex.context.trace.append(StorageWrite(addr, loc, val, transient)) diff --git a/src/halmos/traces.py b/src/halmos/traces.py index f7e4c91c..bef27600 100644 --- a/src/halmos/traces.py +++ b/src/halmos/traces.py @@ -114,13 +114,13 @@ def rendered_slot(slot: Address) -> str: def rendered_sstore(update: StorageWrite) -> str: slot_str = rendered_slot(update.slot) - opcode = cyan("SSTORE" if not update.transient else "TSTORE") + opcode = cyan("TSTORE" if update.transient else "SSTORE") return f"{opcode} @{slot_str} ← {hexify(update.value)}" def rendered_sload(read: StorageRead) -> str: slot_str = rendered_slot(read.slot) - opcode = cyan("SLOAD" if not read.transient else "TLOAD") + opcode = cyan("TLOAD" if read.transient else "SLOAD") return f"{opcode} @{slot_str} → {hexify(read.value)}"