From f1774947ed50d75b5bfff50e24cf5f70ea117758 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Tue, 11 Jun 2024 16:02:50 +0200 Subject: [PATCH] lost in merge: Dao value guards in TxPermission. --- contracts/TxPermissionHbbft.sol | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contracts/TxPermissionHbbft.sol b/contracts/TxPermissionHbbft.sol index 29bf64f..80af276 100644 --- a/contracts/TxPermissionHbbft.sol +++ b/contracts/TxPermissionHbbft.sol @@ -219,7 +219,7 @@ contract TxPermissionHbbft is Initializable, OwnableUpgradeable, ITxPermission, /// before submitting it as contribution. /// The limit can be changed by the owner (typical the DAO) /// @param _value The new minimum gas price. - function setMinimumGasPrice(uint256 _value) public onlyOwner { + function setMinimumGasPrice(uint256 _value) public onlyOwner withinAllowedRange(_value) { // currently, we do not allow to set the minimum gas price to 0, // that would open pandoras box, and the consequences of doing that, // requires deeper research. @@ -234,7 +234,7 @@ contract TxPermissionHbbft is Initializable, OwnableUpgradeable, ITxPermission, /// @dev set's the block gas limit. /// IN HBBFT, there must be consens about the block gas limit. - function setBlockGasLimit(uint256 _value) public onlyOwner { + function setBlockGasLimit(uint256 _value) public onlyOwner withinAllowedRange(_value) { // we make some check that the block gas limit can not be set to low, // to prevent the chain to be completly inoperatable. // this value is chosen arbitrarily