Skip to content

Commit

Permalink
Merge pull request #138 from skalenetwork/enhancements/general
Browse files Browse the repository at this point in the history
Enhancements/general
  • Loading branch information
cstrangedk authored Apr 11, 2020
2 parents dbca6c8 + 2748ce9 commit 84d02a0
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions skale/contracts/dkg.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ def gas_price(self):

@transaction_method(GAS['dkg_broadcast'])
def broadcast(self, group_index, node_index,
verification_vector, secret_key_conribution):
verification_vector, secret_key_contribution):
return self.contract.functions.broadcast(group_index, node_index,
verification_vector,
secret_key_conribution)
secret_key_contribution)

@transaction_method(GAS['dkg_response'])
def response(self, group_index, from_node_index,
Expand Down
2 changes: 1 addition & 1 deletion skale/utils/account_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def generate_accounts(skale,
n_wallets = int(n_wallets)
results = []

for i in range(0, n_wallets):
for _ in range(0, n_wallets):
wallet = generate_account(skale.web3)

send_tokens(skale, skale.wallet, wallet['address'], skale_amount)
Expand Down
2 changes: 1 addition & 1 deletion skale/utils/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@


class RPCWalletError(Exception):
"""Raised when remote wallet retured an error"""
"""Raised when remote wallet returned an error"""


class InvalidWalletError(Exception):
Expand Down
4 changes: 2 additions & 2 deletions tests/contracts/dkg_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ def test_broadcast(skale):
group_index = b'e629fa6598d732768f7c726b4b621285'
node_index = 0
validation_vector = b'validation-vector'
secret_key_conribution = b'secret-key-contrib'
secret_key_contribution = b'secret-key-contrib'

exp = skale.web3.eth.account.signTransaction(
expected_txn, skale.wallet._private_key).rawTransaction
with mock.patch.object(web3.eth.Eth, 'sendRawTransaction') as send_tx_mock:
send_tx_mock.return_value = b'hexstring'
skale.dkg.broadcast(group_index, node_index, validation_vector, secret_key_conribution,
skale.dkg.broadcast(group_index, node_index, validation_vector, secret_key_contribution,
gas_price=skale.dkg.gas_price())
send_tx_mock.assert_called_with(HexBytes(exp))

Expand Down
2 changes: 1 addition & 1 deletion tests/multithreading_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def get_node_data():
skale.nodes_data.get_by_name(DEFAULT_NODE_NAME)


def test_multithead_calls():
def test_multithread_calls():
init_web3(ENDPOINT)
monitors = []
for _ in range(0, 5):
Expand Down
2 changes: 1 addition & 1 deletion tests/schain_config/generator_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
TEST_NODE_IP = '10.10.10.10'
NODE_INFO_LEN = 15
SCHAIN_INFO_LEN = 4
TEST_ACCOUNTS_LEN = 2 # because we're creating eveything from one account
TEST_ACCOUNTS_LEN = 2 # because we're creating everything from one account


TEST_BASE_CONFIG = {
Expand Down

0 comments on commit 84d02a0

Please sign in to comment.