-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add StorageIterator #19
Comments
Note that I've been able to compile a contract with
public class Contract1 : SmartContract
{
public static void Main()
{
Storage.Put(Storage.CurrentContext, "my_prefixA", "1");
Storage.Put(Storage.CurrentContext, "my_prefixB", "2");
Storage.Put(Storage.CurrentContext, "something", "3");
StorageIterator si = Storage.Find(Storage.CurrentContext, "my_prefix");
Runtime.Notify("Starting");
while (si.Next())
{
Runtime.Notify(si.Key);
}
Runtime.Notify("Done");
}
} |
Yes, I believe the implementation of StorageIterator is bugged. I've been meaning to file a separate issue. I think the key prefix should have a length between it and the scriptHash. |
Thanks for the quick handling of the bug in neo-project/neo#200 🥇! Looking forward to see this issue resolved so I can finalise the |
hi @erikzhang, you closed this issue but it's actually not resolved yet. Only the neo core |
I will make a PR since it works correctly now. |
It's added to
neo-project
but not yet in the smart contract framework so can't use it.neo-project/neo@a234978f2
The text was updated successfully, but these errors were encountered: