From d49fe7663ebbc50c33fba0459f915ac6ff526b31 Mon Sep 17 00:00:00 2001 From: badroger Date: Sat, 16 Nov 2019 16:38:50 +0200 Subject: [PATCH] Fix dkg contract name. Increase send_verdicts gas value --- skale/contracts/manager.py | 2 +- skale/contracts_info.py | 2 +- skale/utils/constants.py | 1 + tests/contracts/manager_test.py | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/skale/contracts/manager.py b/skale/contracts/manager.py index 115702f5..b57dafac 100644 --- a/skale/contracts/manager.py +++ b/skale/contracts/manager.py @@ -121,7 +121,7 @@ def send_verdict(self, validator, node_id, downtime, latency): def send_verdicts(self, validator, nodes_ids, downtimes, latencies): op = self.contract.functions.sendVerdicts(validator, nodes_ids, downtimes, latencies) - tx = self.skale.send_tx(op, GAS['send_verdict']) + tx = self.skale.send_tx(op, GAS['send_verdicts']) return {'tx': tx} def deregister(self, node_id): diff --git a/skale/contracts_info.py b/skale/contracts_info.py index 3ed39c95..760e06eb 100644 --- a/skale/contracts_info.py +++ b/skale/contracts_info.py @@ -23,5 +23,5 @@ ContractTypes.DATA, True), ContractInfo('validators_data', 'ValidatorsData', contracts.ValidatorsData, ContractTypes.DATA, True), - ContractInfo('dkg', 'Dkg', contracts.DKG, ContractTypes.API, True), + ContractInfo('dkg', 'SkaleDKG', contracts.DKG, ContractTypes.API, True), ] diff --git a/skale/utils/constants.py b/skale/utils/constants.py index 82b8a7a6..75a8ca0f 100644 --- a/skale/utils/constants.py +++ b/skale/utils/constants.py @@ -6,6 +6,7 @@ 'create_schain': 7500000, 'get_bounty': 4500000, 'send_verdict': 200000, + 'send_verdicts': 500000, 'set_check_time': 200000, 'set_latency': 200000, 'token_transfer': 600000, diff --git a/tests/contracts/manager_test.py b/tests/contracts/manager_test.py index c1fdadfa..a98c8182 100644 --- a/tests/contracts/manager_test.py +++ b/tests/contracts/manager_test.py @@ -119,7 +119,7 @@ def test_send_verdicts(skale): chain_id = skale.web3.eth.chainId expected_txn = { 'value': 0, 'gasPrice': gas_price, 'chainId': chain_id, - 'gas': 200000, 'nonce': nonce, + 'gas': 500000, 'nonce': nonce, 'to': contract_address, 'data': ('0x25b2114b000000000000000000000000000000000000000000' '0000000000000000000000000000000000000000000000000000'