From 3fae1ff4012d72de0c710abf1102afdac4b01213 Mon Sep 17 00:00:00 2001 From: yungwine Date: Tue, 20 Feb 2024 14:24:19 +0700 Subject: [PATCH 1/3] fix autovoting --- mytoncore/functions.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/mytoncore/functions.py b/mytoncore/functions.py index 2b654dc0..4ca0c3f0 100755 --- a/mytoncore/functions.py +++ b/mytoncore/functions.py @@ -347,12 +347,15 @@ def GetBlockTimeAvg(local, timediff): def Offers(local, ton): - saveOffers = ton.GetSaveOffers() + save_offers = ton.GetSaveOffers() offers = ton.GetOffers() for offer in offers: - offerHash = offer.get("hash") - if offerHash in saveOffers: - ton.VoteOffer(offerHash) + offer_hash = offer.get("hash") + if offer_hash in save_offers: + offer_pseudohash = offer.get("pseudohash") + save_offer_pseudohash = save_offers.get(offer_hash) + if offer_pseudohash == save_offer_pseudohash and offer_pseudohash is not None: + ton.VoteOffer(offer_hash) # end define From ecf0fe9bdd288ca956384e24d65d5412131ae066 Mon Sep 17 00:00:00 2001 From: yungwine Date: Thu, 22 Feb 2024 14:31:17 +0700 Subject: [PATCH 2/3] update signle nominator usage --- mytoncore/mytoncore.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mytoncore/mytoncore.py b/mytoncore/mytoncore.py index b515d01b..81fe2c8c 100644 --- a/mytoncore/mytoncore.py +++ b/mytoncore/mytoncore.py @@ -1307,7 +1307,10 @@ def GetStake(self, account, args=None): stake = account.balance - 10 #end if - if stake is None and usePool: + pool_version = self.GetVersionFromCodeHash(account.codeHash) + is_single_nominator = 'spool' in pool_version + + if stake is None and usePool and not is_single_nominator: stake = account.balance - 20 if stake is None: sp = stakePercent / 100 From 679879b9c113e7a4e2cad26211286d8130c54f8f Mon Sep 17 00:00:00 2001 From: yungwine Date: Thu, 22 Feb 2024 20:50:27 +0700 Subject: [PATCH 3/3] add recursive package_data for contracts --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 26b16bd4..1d991cca 100644 --- a/setup.py +++ b/setup.py @@ -24,7 +24,7 @@ package_data={ 'mytoninstaller.scripts': ['*.sh'], 'mytoncore': [ - 'contracts/*', + 'contracts/**/*', 'complaints/*' ], 'mytonctrl': [