Skip to content

Commit

Permalink
Merge pull request #18 from danut13/PAN-1947-chain-unregisration-not-…
Browse files Browse the repository at this point in the history
…possible

fix: chain unregistration and unregistration cancelling
  • Loading branch information
danut13 authored Jun 6, 2024
2 parents f51d046 + 8b23a88 commit eb3c424
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 eb3c424

Please sign in to comment.