diff --git a/neo-cli/CLI/MainService.Consensus.cs b/neo-cli/CLI/MainService.Consensus.cs
deleted file mode 100644
index 6785deeac..000000000
--- a/neo-cli/CLI/MainService.Consensus.cs
+++ /dev/null
@@ -1,18 +0,0 @@
-using Neo.ConsoleService;
-
-namespace Neo.CLI
-{
- partial class MainService
- {
- ///
- /// Process "start consensus" command
- ///
- [ConsoleCommand("start consensus", Category = "Consensus Commands")]
- private void OnStartConsensusCommand()
- {
- if (NoWallet()) return;
- ShowPrompt = false;
- NeoSystem.StartConsensus(CurrentWallet);
- }
- }
-}
diff --git a/neo-cli/CLI/MainService.Vote.cs b/neo-cli/CLI/MainService.Vote.cs
index 84e9c90f6..69fb3e51d 100644
--- a/neo-cli/CLI/MainService.Vote.cs
+++ b/neo-cli/CLI/MainService.Vote.cs
@@ -43,7 +43,7 @@ private void OnRegisterCandidateCommand(UInt160 account)
byte[] script;
using (ScriptBuilder scriptBuilder = new ScriptBuilder())
{
- scriptBuilder.EmitDynamicCall(NativeContract.NEO.Hash, "registerCandidate", true, publicKey);
+ scriptBuilder.EmitDynamicCall(NativeContract.NEO.Hash, "registerCandidate", publicKey);
script = scriptBuilder.ToArray();
}
@@ -83,7 +83,7 @@ private void OnUnregisterCandidateCommand(UInt160 account)
byte[] script;
using (ScriptBuilder scriptBuilder = new ScriptBuilder())
{
- scriptBuilder.EmitDynamicCall(NativeContract.NEO.Hash, "unregisterCandidate", true, publicKey);
+ scriptBuilder.EmitDynamicCall(NativeContract.NEO.Hash, "unregisterCandidate", publicKey);
script = scriptBuilder.ToArray();
}
@@ -107,7 +107,7 @@ private void OnVoteCommand(UInt160 senderAccount, ECPoint publicKey)
byte[] script;
using (ScriptBuilder scriptBuilder = new ScriptBuilder())
{
- scriptBuilder.EmitDynamicCall(NativeContract.NEO.Hash, "vote", true, senderAccount, publicKey);
+ scriptBuilder.EmitDynamicCall(NativeContract.NEO.Hash, "vote", senderAccount, publicKey);
script = scriptBuilder.ToArray();
}
diff --git a/neo-cli/CLI/MainService.cs b/neo-cli/CLI/MainService.cs
index 0991c441f..a31ab6cd1 100644
--- a/neo-cli/CLI/MainService.cs
+++ b/neo-cli/CLI/MainService.cs
@@ -282,7 +282,7 @@ private byte[] LoadDeploymentScript(string nefFilePath, string manifestFilePath,
using (ScriptBuilder sb = new ScriptBuilder())
{
- sb.EmitDynamicCall(NativeContract.ContractManagement.Hash, "deploy", true, nef.ToArray(), manifest.ToJson().ToString());
+ sb.EmitDynamicCall(NativeContract.ContractManagement.Hash, "deploy", nef.ToArray(), manifest.ToJson().ToString());
return sb.ToArray();
}
}
@@ -391,10 +391,6 @@ public async void Start(string[] args)
{
Console.WriteLine($"Failed to open file \"{Settings.Default.UnlockWallet.Path}\"");
}
- if (Settings.Default.UnlockWallet.StartConsensus && CurrentWallet != null)
- {
- OnStartConsensusCommand();
- }
}
}
@@ -525,7 +521,6 @@ private bool OnInvokeWithResult(UInt160 scriptHash, string operation, out StackI
}
}
- bool hasReturnValue;
var snapshot = Blockchain.Singleton.GetSnapshot();
ContractState contract = NativeContract.ContractManagement.GetContract(snapshot, scriptHash);
if (contract == null)
@@ -542,17 +537,13 @@ private bool OnInvokeWithResult(UInt160 scriptHash, string operation, out StackI
result = StackItem.Null;
return false;
}
- else
- {
- hasReturnValue = contract.Manifest.Abi.GetMethod(operation).ReturnType != ContractParameterType.Void;
- }
}
byte[] script;
using (ScriptBuilder scriptBuilder = new ScriptBuilder())
{
- scriptBuilder.EmitDynamicCall(scriptHash, operation, hasReturnValue, parameters.ToArray());
+ scriptBuilder.EmitDynamicCall(scriptHash, operation, parameters.ToArray());
script = scriptBuilder.ToArray();
Console.WriteLine($"Invoking script with: '{script.ToBase64String()}'");
}
diff --git a/neo-cli/Settings.cs b/neo-cli/Settings.cs
index 0324401e1..b969f9f9f 100644
--- a/neo-cli/Settings.cs
+++ b/neo-cli/Settings.cs
@@ -96,7 +96,6 @@ public class UnlockWalletSettings
{
public string Path { get; }
public string Password { get; }
- public bool StartConsensus { get; }
public bool IsActive { get; }
public UnlockWalletSettings(IConfigurationSection section)
@@ -105,7 +104,6 @@ public UnlockWalletSettings(IConfigurationSection section)
{
this.Path = section.GetValue("Path", "");
this.Password = section.GetValue("Password", "");
- this.StartConsensus = bool.Parse(section.GetValue("StartConsensus", "false"));
this.IsActive = bool.Parse(section.GetValue("IsActive", "false"));
}
}
diff --git a/neo-cli/config.json b/neo-cli/config.json
index a58f51a46..1dce7cd20 100644
--- a/neo-cli/config.json
+++ b/neo-cli/config.json
@@ -16,7 +16,6 @@
"UnlockWallet": {
"Path": "",
"Password": "",
- "StartConsensus": false,
"IsActive": false
},
"PluginURL": "https://github.com/neo-project/neo-modules/releases/download/v{1}/{0}.zip"
diff --git a/neo-cli/config.mainnet.json b/neo-cli/config.mainnet.json
index a58f51a46..1dce7cd20 100644
--- a/neo-cli/config.mainnet.json
+++ b/neo-cli/config.mainnet.json
@@ -16,7 +16,6 @@
"UnlockWallet": {
"Path": "",
"Password": "",
- "StartConsensus": false,
"IsActive": false
},
"PluginURL": "https://github.com/neo-project/neo-modules/releases/download/v{1}/{0}.zip"
diff --git a/neo-cli/config.testnet.json b/neo-cli/config.testnet.json
index 50bf1c497..3d75002cf 100644
--- a/neo-cli/config.testnet.json
+++ b/neo-cli/config.testnet.json
@@ -16,7 +16,6 @@
"UnlockWallet": {
"Path": "",
"Password": "",
- "StartConsensus": false,
"IsActive": false
},
"PluginURL": "https://github.com/neo-project/neo-modules/releases/download/v{1}/{0}.zip"
diff --git a/neo-cli/neo-cli.csproj b/neo-cli/neo-cli.csproj
index e7e5ada78..b51118f28 100644
--- a/neo-cli/neo-cli.csproj
+++ b/neo-cli/neo-cli.csproj
@@ -28,7 +28,7 @@
-
+