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
Changes from 1 commit
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