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

Allow to skip verification #534

Merged
merged 3 commits into from
Jan 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion neo-cli/CLI/MainService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1370,9 +1370,14 @@ public void OpenWallet(string path, string password)
public async void Start(string[] args)
{
if (NeoSystem != null) return;
bool verifyImport = true;
for (int i = 0; i < args.Length; i++)
switch (args[i])
{
case "/noverify":
case "--noverify":
verifyImport = false;
break;
case "/testnet":
case "--testnet":
case "-t":
Expand All @@ -1398,7 +1403,11 @@ public async void Start(string[] args)
blocksToImport.Add(blocksBeingImported.Current);
}
if (blocksToImport.Count == 0) break;
await NeoSystem.Blockchain.Ask<Blockchain.ImportCompleted>(new Blockchain.Import { Blocks = blocksToImport });
await NeoSystem.Blockchain.Ask<Blockchain.ImportCompleted>(new Blockchain.Import
{
Blocks = blocksToImport,
Verify = verifyImport
});
if (NeoSystem is null) return;
}
}
Expand Down
2 changes: 1 addition & 1 deletion neo-cli/neo-cli.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Neo" Version="3.0.0-CI00844" />
<PackageReference Include="Neo" Version="3.0.0-CI00853" />
<PackageReference Include="System.ServiceProcess.ServiceController" Version="4.6.0" />
</ItemGroup>

Expand Down
10 changes: 7 additions & 3 deletions neo-gui/GUI/Wrappers/UIntBaseConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,13 @@ public override object ConvertTo(ITypeDescriptorContext context, CultureInfo cul
{
if (destinationType != typeof(string))
throw new NotSupportedException();
UIntBase i = value as UIntBase;
if (i == null) return null;
return i.ToString();

return value switch
{
UInt160 i => i.ToString(),
UInt256 i => i.ToString(),
_ => null,
};
}
}
}