Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

Commit

Permalink
fix protocol settings
Browse files Browse the repository at this point in the history
  • Loading branch information
bettybao1209 committed Feb 13, 2021
1 parent 071918b commit 1c432cd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion neo-cli/CLI/MainService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ public async void Start(string[] args)

_ = new Logger();

NeoSystem = new NeoSystem(ProtocolSettings.Load("protocol.json"), Settings.Default.Storage.Engine, Settings.Default.Storage.Path);
NeoSystem = new NeoSystem(ProtocolSettings.Instance, Settings.Default.Storage.Engine, Settings.Default.Storage.Path);

NeoSystem.AddService(this);

Expand Down
5 changes: 2 additions & 3 deletions neo-cli/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ public static Settings Default
if (_default == null)
{
IConfigurationRoot config = new ConfigurationBuilder().AddJsonFile("config.json").Build();
IConfigurationSection section = config.GetSection("ApplicationConfiguration");
_default = new Settings(section);
Initialize(config);
}

return _default;
Expand All @@ -58,7 +57,7 @@ public class LoggerSettings

public LoggerSettings(IConfigurationSection section)
{
this.Path = string.Format(section.GetValue("Path", "Logs_{0}"), ProtocolSettings.Default.Magic.ToString("X8"));
this.Path = string.Format(section.GetValue("Path", "Logs_{0}"), ProtocolSettings.Instance.Magic.ToString("X8"));
this.ConsoleOutput = section.GetValue("ConsoleOutput", false);
this.Active = section.GetValue("Active", false);
}
Expand Down
4 changes: 2 additions & 2 deletions neo-cli/neo-cli.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Copyright>2016-2021 The Neo Project</Copyright>
Expand All @@ -23,7 +23,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Neo" Version="3.0.0-CI01207" />
<PackageReference Include="Neo" Version="3.0.0-CI01209" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit 1c432cd

Please sign in to comment.