Skip to content

Commit dcf9298

Browse files
committed
allow vote for teleport offers only to master vals
1 parent 44d515e commit dcf9298

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

modules/btc_teleport.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,10 @@ def vote_offer_btc_teleport(self, args):
151151
validator_key = self.ton.GetValidatorKey()
152152
validator_pubkey_b64 = self.ton.GetPubKeyBase64(validator_key)
153153
validator_index = self.ton.GetValidatorIndex()
154+
config34 = self.ton.GetConfig34()
155+
if validator_index == -1 or validator_index >= config34['mainValidators']:
156+
self.local.add_log("Can not vote for BTC Teleport proposal from non-masterchain validator", "error")
157+
return
154158
for offer_hash in args:
155159
current_offers = self.get_offers()
156160
if offer_hash not in current_offers:

0 commit comments

Comments
 (0)