diff --git a/contracts/CommonHealthCheck.sol b/contracts/CommonHealthCheck.sol index d848b43a..d38b5d70 100644 --- a/contracts/CommonHealthCheck.sol +++ b/contracts/CommonHealthCheck.sol @@ -22,6 +22,7 @@ contract CommonHealthCheck { mapping(address => address) public checks; mapping(address => bool) public disabledCheck; + event DisableHealthCheck(address strategy, bool disabled); modifier onlyGovernance() { require(msg.sender == governance, "!authorized"); @@ -80,10 +81,12 @@ contract CommonHealthCheck { } function enableCheck(address _strategy) external onlyVault(_strategy) { + emit DisableHealthCheck(_strategy, false); disabledCheck[_strategy] = false; } function setDisabledCheck(address _strategy, bool disabled) external onlyAuthorized { + emit DisableHealthCheck(_strategy, disabled); disabledCheck[_strategy] = disabled; } diff --git a/tests/functional/strategy/test_fees.py b/tests/functional/strategy/test_fees.py index fc343b90..207384ef 100644 --- a/tests/functional/strategy/test_fees.py +++ b/tests/functional/strategy/test_fees.py @@ -18,7 +18,10 @@ def test_performance_fees( token.transfer(strategy, 10 ** token.decimals(), {"from": gov}) chain.sleep(1) - common_health_check.setDisabledCheck(strategy, True, {"from": gov}) + tx = common_health_check.setDisabledCheck(strategy, True, {"from": gov}) + tx.events["DisableHealthCheck"]["disabled"] == True + tx.events["DisableHealthCheck"]["strategy"] == strategy + strategy.harvest({"from": strategist}) assert vault.balanceOf(rewards) == 0.045 * 10 ** token.decimals()