Skip to content
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

Expose DbCache (for plugins, etc.) + useful Neo.IO.Helper methods #613

Merged
merged 2 commits into from
Feb 27, 2019

Conversation

jsolman
Copy link
Contributor

@jsolman jsolman commented Feb 27, 2019

Plugins that persist to a separate LevelDB store may want to use the DbCache in order to cache data they will be writing to disk and exposing through RPC. One example is moving #569 to a plugin, and there are other plugins I am working on that will need it.

@jsolman jsolman changed the title Expose DbCache (for plugins, etc.) Expose DbCache (for plugins, etc.) + useful Neo.IO.Helper methods Feb 27, 2019
@@ -9,6 +9,8 @@ namespace Neo.IO
{
public static class Helper
{
public const int GroupingSizeInBytes = 16;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

private?

Copy link
Contributor Author

@jsolman jsolman Feb 27, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also can be needed in code that uses Find from a plugin. I have code that needs it, because to search for a prefix one needs to add a 0 byte after every 16 characters to search for a prefix longer than this length.

Copy link
Contributor Author

@jsolman jsolman Feb 27, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the Find method inserted the 0 bytes after every 16 characters it wouldn’t be needed. If we change that in a subsequent PR we could change this to be internal perhaps, but for now, we need it public.

@jsolman jsolman merged commit e86a8b6 into master Feb 27, 2019
@shargon shargon deleted the ExposeDbCache branch February 27, 2019 17:26
Thacryba pushed a commit to simplitech/neo that referenced this pull request Feb 17, 2020
* 2.9.0

* updates for 2.9.0

* Update v2.9.0.md (neo-project#610)

Adjustment for instruction of getting nep-5 applicationlog.

* Update invokescript.md (neo-project#613)

Add tx

* Update invokefunction.md (neo-project#612)

Add tx for response.

* Create getwalletheight (neo-project#611)

Add getwalletheight api.

* updates for 2.9.0

* minor updates

* Update setup.md (neo-project#617)

Add introduction of Plugins.

* Update v2.9.0.md (neo-project#615)

Add introduction for setting config.json

* final updates

* Update v2.9.0.md (neo-project#618)

Add notes for install plugins.

* plugin related
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants