Skip to content

Commit

Permalink
Merge pull request #48 from skalenetwork/bug/dkg-contract-invalid-name
Browse files Browse the repository at this point in the history
Fix dkg contract name. Increase send_verdicts gas value
  • Loading branch information
dmytrotkk authored Nov 18, 2019
2 parents 2bbe730 + d5ca152 commit a7c0fcf
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion skale/contracts/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,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 = post_transaction(self.skale.wallet, op, GAS['send_verdict'])
tx = post_transaction(self.skale.wallet, op, GAS['send_verdicts'])
return {'tx': tx}

def deregister(self, node_id):
Expand Down
2 changes: 1 addition & 1 deletion skale/contracts_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
]
1 change: 1 addition & 0 deletions skale/utils/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion tests/contracts/manager_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit a7c0fcf

Please sign in to comment.