Skip to content

Commit

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

0 comments on commit d82d01a

Please sign in to comment.