From ed8023ecf701ade069195c55935c81957b3f299e Mon Sep 17 00:00:00 2001 From: Gabriel Levcovitz Date: Thu, 21 Mar 2024 18:41:11 -0300 Subject: [PATCH] review changes --- hathor/feature_activation/bit_signaling_service.py | 5 ++--- tests/feature_activation/test_bit_signaling_service.py | 6 ++++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/hathor/feature_activation/bit_signaling_service.py b/hathor/feature_activation/bit_signaling_service.py index d9e1bf7e7..639eb1a5c 100644 --- a/hathor/feature_activation/bit_signaling_service.py +++ b/hathor/feature_activation/bit_signaling_service.py @@ -139,10 +139,9 @@ def remove_feature_support(self, feature: Feature) -> None: def on_must_signal(self, feature: Feature) -> None: """ - When the MUST_SIGNAL phase is reached, feature support is automatically enabled, unless explicitly disabled. + When the MUST_SIGNAL phase is reached, feature support is automatically enabled. """ - if feature not in self._not_support_features: - self.add_feature_support(feature) + self.add_feature_support(feature) def _log_signal_bits(self, feature: Feature, enable_bit: bool, support: bool, not_support: bool) -> None: """Generate info log for a feature's signal.""" diff --git a/tests/feature_activation/test_bit_signaling_service.py b/tests/feature_activation/test_bit_signaling_service.py index 13cb19e90..930ca39f2 100644 --- a/tests/feature_activation/test_bit_signaling_service.py +++ b/tests/feature_activation/test_bit_signaling_service.py @@ -295,12 +295,13 @@ def test_on_must_signal_not_supported() -> None: tx_storage=Mock(), support_features=set(), not_support_features={Feature.NOP_FEATURE_1}, + feature_storage=Mock(), ) service.on_must_signal(feature=Feature.NOP_FEATURE_1) - assert service._support_features == set() - assert service._not_support_features == {Feature.NOP_FEATURE_1} + assert service._support_features == {Feature.NOP_FEATURE_1} + assert service._not_support_features == set() def test_on_must_signal_supported() -> None: @@ -310,6 +311,7 @@ def test_on_must_signal_supported() -> None: tx_storage=Mock(), support_features=set(), not_support_features=set(), + feature_storage=Mock(), ) service.on_must_signal(feature=Feature.NOP_FEATURE_1)