Skip to content

Commit

Permalink
Change the price of registerCandidate (neo-project#2252)
Browse files Browse the repository at this point in the history
  • Loading branch information
erikzhang authored and cloud8little committed Jan 24, 2021
1 parent 607ef25 commit ca49f78
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/neo/SmartContract/Native/NeoToken.cs
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ public BigInteger UnclaimedGas(StoreView snapshot, UInt160 account, uint end)
return CalculateBonus(snapshot, state.VoteTo, state.Balance, state.BalanceHeight, end);
}

[ContractMethod(0_05000000, CallFlags.WriteStates)]
[ContractMethod(1000_00000000, CallFlags.WriteStates)]
private bool RegisterCandidate(ApplicationEngine engine, ECPoint pubkey)
{
if (!engine.CheckWitnessInternal(Contract.CreateSignatureRedeemScript(pubkey).ToScriptHash()))
Expand Down
2 changes: 1 addition & 1 deletion tests/neo.UnitTests/SmartContract/Native/UT_NeoToken.cs
Original file line number Diff line number Diff line change
Expand Up @@ -939,7 +939,7 @@ internal static (bool State, bool Result) Check_Vote(StoreView snapshot, byte[]
internal static (bool State, bool Result) Check_RegisterValidator(StoreView snapshot, byte[] pubkey, Block persistingBlock)
{
using var engine = ApplicationEngine.Create(TriggerType.Application,
new Nep17NativeContractExtensions.ManualWitness(Contract.CreateSignatureRedeemScript(ECPoint.DecodePoint(pubkey, ECCurve.Secp256r1)).ToScriptHash()), snapshot, persistingBlock);
new Nep17NativeContractExtensions.ManualWitness(Contract.CreateSignatureRedeemScript(ECPoint.DecodePoint(pubkey, ECCurve.Secp256r1)).ToScriptHash()), snapshot, persistingBlock, 1100_00000000);

engine.LoadScript(NativeContract.NEO.Script, configureState: p => p.ScriptHash = NativeContract.NEO.Hash);

Expand Down

0 comments on commit ca49f78

Please sign in to comment.