Skip to content
This repository has been archived by the owner on Nov 15, 2021. It is now read-only.

Commit

Permalink
Merge pull request #417 from shargon/patch-1
Browse files Browse the repository at this point in the history
Fix STORAGE_DELETE logs
  • Loading branch information
localhuman committed May 15, 2018
2 parents 6469cdf + b4e69cc commit 754325f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions neo/SmartContract/StateMachine.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,13 +530,14 @@ def Storage_Delete(self, engine):

storage_key = StorageKey(script_hash=context.ScriptHash, key=key)

keystr = key
if len(key) == 20:
keystr = Crypto.ToAddress(UInt160(data=key))

self.events_to_dispatch.append(SmartContractEvent(SmartContractEvent.STORAGE_DELETE, [keystr],
context.ScriptHash, Blockchain.Default().Height + 1,
engine.ScriptContainer.Hash if engine.ScriptContainer else None,
test_mode=engine.testMode))
self.events_to_dispatch.append(SmartContractEvent(SmartContractEvent.STORAGE_DELETE, [keystr],
context.ScriptHash, Blockchain.Default().Height + 1,
engine.ScriptContainer.Hash if engine.ScriptContainer else None,
test_mode=engine.testMode))

self._storages.Remove(storage_key.ToArray())

Expand Down

0 comments on commit 754325f

Please sign in to comment.