Skip to content

Commit

Permalink
candidator
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashuaidehao committed Mar 23, 2021
1 parent 7b27c6e commit d4c2ca2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion neo3-gui/neo3-gui/ClientApp/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "neo-gui",
"version": "1.2.1",
"version": "1.2.2",
"private": true,
"main": "main.js",
"homepage": "./",
Expand Down
2 changes: 1 addition & 1 deletion neo3-gui/neo3-gui/Helpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ public static Transaction InitTransaction(this Wallet wallet, byte[] script, par
/// <returns></returns>
public static Transaction InitTransaction(this Wallet wallet, byte[] script, params Signer[] signers)
{
var tx = wallet.MakeTransaction(GetDefaultSnapshot(), script, null, signers);
var tx = wallet.MakeTransaction(GetDefaultSnapshot(), script, null, signers, maxGas: 2000_00000000);
return tx;
}

Expand Down
4 changes: 2 additions & 2 deletions neo3-gui/neo3-gui/Services/ApiServices/ContractApiService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -418,8 +418,8 @@ public async Task<object> ApplyForValidator(string pubkey)
return Error(ErrorCode.InvalidPara);
}
var snapshot = Helpers.GetDefaultSnapshot();
var validators = NativeContract.NEO.GetCommittee(snapshot);
if (validators.Any(v => v.Equals(publicKey)))
var candidates = NativeContract.NEO.GetCandidates(snapshot);
if (candidates.Any(v => v.PublicKey.Equals(publicKey)))
{
return Error(ErrorCode.ValidatorAlreadyExist);
}
Expand Down

0 comments on commit d4c2ca2

Please sign in to comment.