@@ -91,7 +91,8 @@ def force_old_mn_proto(self, mn):
91
91
return False , True
92
92
93
93
def test_no_banning (self , expected_connections = None ):
94
- for _ in range (3 ):
94
+ for i in range (3 ):
95
+ self .log .info (f"Testing no PoSe banning in normal conditions { i + 1 } /3" )
95
96
self .mine_quorum (expected_connections = expected_connections )
96
97
for mn in self .mninfo :
97
98
assert not self .check_punished (mn ) and not self .check_banned (mn )
@@ -162,7 +163,8 @@ def test_banning(self, invalidate_proc, expected_connections=None):
162
163
mninfos_online = self .mninfo .copy ()
163
164
mninfos_valid = self .mninfo .copy ()
164
165
expected_contributors = len (mninfos_online )
165
- for _ in range (2 ):
166
+ for i in range (2 ):
167
+ self .log .info (f"Testing PoSe banning due to { invalidate_proc .__name__ } { i + 1 } /2" )
166
168
mn = mninfos_valid .pop ()
167
169
went_offline , instant_ban = invalidate_proc (mn )
168
170
expected_complaints = expected_contributors - 1
@@ -174,13 +176,15 @@ def test_banning(self, invalidate_proc, expected_connections=None):
174
176
# so nodes are PoSe-banned in the same DKG they misbehave without being PoSe-punished first.
175
177
if instant_ban :
176
178
assert expected_connections is not None
179
+ self .log .info ("Expecting instant PoSe banning" )
177
180
self .reset_probe_timeouts ()
178
181
self .mine_quorum (expected_connections = expected_connections , expected_members = expected_contributors , expected_contributions = expected_contributors , expected_complaints = expected_complaints , expected_commitments = expected_contributors , mninfos_online = mninfos_online , mninfos_valid = mninfos_valid )
179
182
else :
180
183
# It's ok to miss probes/quorum connections up to 5 times.
181
184
# 6th time is when it should be banned for sure.
182
185
assert expected_connections is None
183
- for _ in range (6 ):
186
+ for j in range (6 ):
187
+ self .log .info (f"Accumulating PoSe penalty { j + 1 } /6" )
184
188
self .reset_probe_timeouts ()
185
189
self .mine_quorum_less_checks (expected_contributors - 1 , mninfos_online )
186
190
@@ -191,7 +195,7 @@ def test_banning(self, invalidate_proc, expected_connections=None):
191
195
expected_contributors -= 1
192
196
193
197
def repair_masternodes (self , restart ):
194
- # Repair all nodes
198
+ self . log . info ( "Repairing all banned and punished masternodes" )
195
199
for mn in self .mninfo :
196
200
if self .check_banned (mn ) or self .check_punished (mn ):
197
201
addr = self .nodes [0 ].getnewaddress ()
0 commit comments