diff --git a/neo-cli/CLI/MainService.cs b/neo-cli/CLI/MainService.cs index 25cf10bbf..17700d6ff 100644 --- a/neo-cli/CLI/MainService.cs +++ b/neo-cli/CLI/MainService.cs @@ -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": @@ -1398,7 +1403,11 @@ public async void Start(string[] args) blocksToImport.Add(blocksBeingImported.Current); } if (blocksToImport.Count == 0) break; - await NeoSystem.Blockchain.Ask(new Blockchain.Import { Blocks = blocksToImport }); + await NeoSystem.Blockchain.Ask(new Blockchain.Import + { + Blocks = blocksToImport, + Verify = verifyImport + }); if (NeoSystem is null) return; } } diff --git a/neo-cli/neo-cli.csproj b/neo-cli/neo-cli.csproj index b28ac396a..b888adc95 100644 --- a/neo-cli/neo-cli.csproj +++ b/neo-cli/neo-cli.csproj @@ -28,7 +28,7 @@ - + diff --git a/neo-gui/GUI/Wrappers/UIntBaseConverter.cs b/neo-gui/GUI/Wrappers/UIntBaseConverter.cs index e6559ef68..a1ce2b888 100644 --- a/neo-gui/GUI/Wrappers/UIntBaseConverter.cs +++ b/neo-gui/GUI/Wrappers/UIntBaseConverter.cs @@ -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, + }; } } }