Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removes substrate call in format_error_message #2542

Merged
merged 2 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions bittensor/core/extrinsics/commit_reveal.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,7 @@ def _do_commit_reveal_v3(
if response.is_success:
return True, None
else:
return False, format_error_message(
response.error_message, substrate=self.substrate
)
return False, format_error_message(response.error_message)


def commit_reveal_v3_extrinsic(
Expand Down
4 changes: 1 addition & 3 deletions tests/unit_tests/extrinsics/test_commit_reveal.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,7 @@ def test_do_commit_reveal_v3_failure_due_to_error(mocker, subtensor):
wait_for_inclusion=True,
wait_for_finalization=True,
)
mocked_format_error_message.assert_called_once_with(
"Mocked error", substrate=subtensor.substrate
)
mocked_format_error_message.assert_called_once_with("Mocked error")
assert result == (False, "Formatted error")


Expand Down
Loading