Skip to content

Commit

Permalink
fix: chain unregistration and unregistration cancelling
Browse files Browse the repository at this point in the history
  • Loading branch information
danut13 committed Jun 6, 2024
1 parent f51d046 commit 8b23a88
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions pantos/servicenode/blockchains/ethereum.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ def unregister_node(self) -> None:
request = BlockchainClient._TransactionSubmissionStartRequest(
ContractAbi.PANTOS_HUB,
_HUB_UNREGISTER_SERVICE_NODE_FUNCTION_SELECTOR,
(self.__address), _HUB_UNREGISTER_SERVICE_NODE_GAS, None,
(self.__address, ), _HUB_UNREGISTER_SERVICE_NODE_GAS, None,
nonce)
internal_transaction_id = self._start_transaction_submission(
request, node_connections)
Expand Down Expand Up @@ -269,8 +269,8 @@ def cancel_unregistration(self) -> None:
request = BlockchainClient._TransactionSubmissionStartRequest(
ContractAbi.PANTOS_HUB,
_HUB_CANCEL_SERVICE_NODE_UNREGISTRATION_FUNCTION_SELECTOR,
(self.__address), _HUB_CANCEL_SERVICE_NODE_UNREGISTRATION_GAS,
None, nonce)
(self.__address, ),
_HUB_CANCEL_SERVICE_NODE_UNREGISTRATION_GAS, None, nonce)
internal_transaction_id = self._start_transaction_submission(
request, node_connections)
extra_info |= {'internal_transaction_id': internal_transaction_id}
Expand Down
4 changes: 2 additions & 2 deletions tests/blockchains/test_ethereum.py
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ def test_unregister_node_correct(mock_start_transaction_submission,
mock_start_transaction_submission.assert_called_once()
unregister_request = mock_start_transaction_submission.call_args.args[0]
assert unregister_request.contract_abi is ContractAbi.PANTOS_HUB
assert unregister_request.function_args == (service_node_address)
assert unregister_request.function_args == (service_node_address, )


@unittest.mock.patch.object(EthereumClient, '_start_transaction_submission',
Expand Down Expand Up @@ -933,7 +933,7 @@ def test_cancel_unregistration_correct(mock_start_transaction_submission,
mock_start_transaction_submission.assert_called_once()
cancel_request = mock_start_transaction_submission.call_args.args[0]
assert cancel_request.contract_abi is ContractAbi.PANTOS_HUB
assert cancel_request.function_args == (service_node_address)
assert cancel_request.function_args == (service_node_address, )


@unittest.mock.patch.object(EthereumClient, '_start_transaction_submission',
Expand Down

0 comments on commit 8b23a88

Please sign in to comment.