diff --git a/src/neo/SmartContract/Native/Tokens/NeoToken.cs b/src/neo/SmartContract/Native/Tokens/NeoToken.cs index 08371a3fbf..ca06d8378c 100644 --- a/src/neo/SmartContract/Native/Tokens/NeoToken.cs +++ b/src/neo/SmartContract/Native/Tokens/NeoToken.cs @@ -109,7 +109,8 @@ protected override void OnPersist(ApplicationEngine engine) [ContractMethod(0_05000000, CallFlags.AllowModifyStates)] private bool SetGasPerBlock(ApplicationEngine engine, BigInteger gasPerBlock) { - if (gasPerBlock < 0 || gasPerBlock > 10 * GAS.Factor) return false; + if (gasPerBlock < 0 || gasPerBlock > 10 * GAS.Factor) + throw new ArgumentOutOfRangeException(nameof(gasPerBlock)); if (!CheckCommittee(engine)) return false; GasRecord gasRecord = engine.Snapshot.Storages.GetAndChange(CreateStorageKey(Prefix_GasPerBlock)).GetInteroperable(); if (gasRecord[^1].Index == engine.Snapshot.PersistingBlock.Index)