Skip to content

Commit

Permalink
Made MemoryStore the default whithout config.json for neo-cli (#…
Browse files Browse the repository at this point in the history
…3085)

* Made MemoryStore the default for `neo-cli`

* Remove nullable Engine

---------

Co-authored-by: Shargon <shargon@gmail.com>
  • Loading branch information
cschuchardt88 and shargon authored Jan 12, 2024
1 parent 3d0d27e commit a294c9c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/Neo.CLI/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

using Microsoft.Extensions.Configuration;
using Neo.Network.P2P;
using Neo.Persistence;
using System;
using System.Threading;

Expand Down Expand Up @@ -77,13 +78,13 @@ public LoggerSettings(IConfigurationSection section)

public class StorageSettings
{
public string Engine { get; } = string.Empty;
public string Engine { get; } = nameof(MemoryStore);
public string Path { get; } = string.Empty;

public StorageSettings(IConfigurationSection section)
{
Engine = section.GetValue(nameof(Engine), "LevelDBStore")!;
Path = section.GetValue(nameof(Path), "Data_LevelDB_{0}")!;
Engine = section.GetValue(nameof(Engine), nameof(MemoryStore))!;
Path = section.GetValue(nameof(Path), string.Empty)!;
}
}

Expand Down

0 comments on commit a294c9c

Please sign in to comment.