Skip to content

Commit

Permalink
Revert "fix #199"
Browse files Browse the repository at this point in the history
This reverts commit d82d01a.
  • Loading branch information
Erik Zhang committed Mar 20, 2018
1 parent d82d01a commit 78ae223
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions neo/SmartContract/StateReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -948,12 +948,8 @@ protected virtual bool Storage_Find(ExecutionEngine engine)
StorageContext context = _interface.GetInterface<StorageContext>();
if (!CheckStorageContext(context)) return false;
byte[] prefix = engine.EvaluationStack.Pop().GetByteArray();
StorageKey key = new StorageKey
{
ScriptHash = context.ScriptHash,
Key = prefix
};
StorageIterator iterator = new StorageIterator(Storages.Find(key.ToArray()).GetEnumerator());
prefix = context.ScriptHash.ToArray().Concat(prefix).ToArray();
StorageIterator iterator = new StorageIterator(Storages.Find(prefix).GetEnumerator());
engine.EvaluationStack.Push(StackItem.FromInterface(iterator));
disposables.Add(iterator);
return true;
Expand Down

0 comments on commit 78ae223

Please sign in to comment.