Skip to content

Commit f27e1fb

Browse files
committed
rm complaints for zero blocks created non-masterchain vals
1 parent 9038280 commit f27e1fb

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

mytoncore/mytoncore.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2384,9 +2384,8 @@ def get_valid_complaints(self, complaints: dict, election_id: int):
23842384
self.local.add_log(f"complaint {complaint['hash_hex']} declined: complaint info was not found, probably it's wrong", "info")
23852385
continue
23862386

2387-
if (vload["id"] >= config32['mainValidators'] and
2388-
vload["masterBlocksCreated"] + vload["workBlocksCreated"] > 0):
2389-
self.local.add_log(f"complaint {complaint['hash_hex']} declined: complaint created for non masterchain validator that created more than zero blocks", "info")
2387+
if vload["id"] >= config32['mainValidators']:
2388+
self.local.add_log(f"complaint {complaint['hash_hex']} declined: complaint created for non masterchain validator", "info")
23902389
continue
23912390

23922391
# check complaint fine value
@@ -2587,7 +2586,7 @@ def CheckValidators(self, start, end):
25872586
pseudohash = pubkey + str(electionId)
25882587
if pseudohash in valid_complaints or pseudohash in voted_complaints_pseudohashes: # do not create complaints that already created or voted by ourself
25892588
continue
2590-
if item['id'] >= config['mainValidators'] and item["masterBlocksCreated"] + item["workBlocksCreated"] > 0: # create complaints for non-masterchain validators only if they created 0 blocks
2589+
if item['id'] >= config['mainValidators']: # do not create complaints for non-masterchain validators
25912590
continue
25922591
# Create complaint
25932592
fileName = self.remove_proofs_from_complaint(fileName)

0 commit comments

Comments
 (0)