-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Fix store #3149
Fix store #3149
Conversation
@@ -20,7 +19,7 @@ namespace Neo; | |||
static class Benchmarks | |||
{ | |||
private static readonly ProtocolSettings protocol = ProtocolSettings.Load("config.json"); | |||
private static readonly NeoSystem system = new(protocol, new MemoryStore()); | |||
private static readonly NeoSystem system = new(protocol, (string)null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, what will be the default store?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Memory
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is related to the PR that made MemoryStore
the default one, right?
So, let's change the .config.json default to be MemoryStore, in this way we remove LevelDB dependency, keeping the idea behind the original change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is working, @shargon, fix the problem, but I am not sure about the default
/// <param name="storageProvider">The storage engine used to create the <see cref="IStoreProvider"/> objects. If this parameter is <see langword="null"/>, a default in-memory storage engine will be used.</param> | ||
/// <param name="storagePath">The path of the storage. If <paramref name="storageProvider"/> is the default in-memory storage engine, this parameter is ignored.</param> | ||
public NeoSystem(ProtocolSettings settings, string? storageProvider = null, string? storagePath = null) : | ||
this(settings, StoreFactory.GetStoreProvider(storageProvider ?? nameof(MemoryStore)), storagePath) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vncoelho the default is memory
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested. This works!
Close neo-project/neo-modules#874 #3144