Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: split stake in 2 when not elected / ValidatorList in testnet #260

Open
wants to merge 2 commits into
base: mytonctrl2
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix
redref committed May 21, 2024

Verified

This commit was signed with the committer’s verified signature.
akorchyn Artur Yurii Korchynskyi
commit 9d7bc61f5f1e91e8674f8843a3b8b4c061d568b6
4 changes: 2 additions & 2 deletions mytoncore/mytoncore.py
Original file line number Diff line number Diff line change
@@ -1337,9 +1337,9 @@ def GetStake(self, account, args=None):
else:
for validator in vconfig.validators:
# Check validator is in active period
if validator.election_date - config15["elections_end_before"] < get_timestamp() < validator.expire_at:
if validator.election_date - config15["electionsEndBefore"] < get_timestamp() < validator.expire_at:
# Check validator is elected
if self.GetAdnlAddr() in self.GetValidatorsList():
if self.GetAdnlAddr() in [x["adnlAddr"] for x in self.GetValidatorsList()]:
stake = int(account.balance*sp)
break
else: