Skip to content

Commit f628636

Browse files
committed
add find_myself_in_vl
1 parent d7e879b commit f628636

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

mytoncore.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2677,6 +2677,15 @@ def GetValidatorsList(self, past=False):
26772677
return validators
26782678
#end define
26792679

2680+
def find_myself_in_vl(self):
2681+
current_vl = self.GetValidatorsList()
2682+
past_vl = self.GetValidatorsList(past=True)
2683+
my_adnl = self.GetAdnlAddr()
2684+
for validator in current_vl + past_vl:
2685+
if validator["adnlAddr"] == my_adnl:
2686+
return True
2687+
return False
2688+
26802689
def CheckValidators(self, start, end):
26812690
local.add_log("start CheckValidators function", "debug")
26822691
electionId = start

0 commit comments

Comments
 (0)