Skip to content

Commit

Permalink
Rename method to fetch subnet commits
Browse files Browse the repository at this point in the history
  • Loading branch information
ibraheem-opentensor committed Dec 13, 2024
1 parent 3de9519 commit 42e2a0c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bittensor/core/subtensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1309,7 +1309,7 @@ def last_drand_round(
)
return getattr(result, "value", None)

def get_weight_commits(self, netuid: int, block: Optional[int] = None) -> list:
def get_current_weight_commit_info(self, netuid: int, block: Optional[int] = None) -> list:
"""
Retrieves CRV3 weight commit information for a specific subnet.
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e_tests/test_commit_reveal_v3.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ async def test_commit_and_reveal_weights_cr3(local_chain):
), "Revealed drand pulse is older than the drand pulse right after setting weights"

# Fetch current commits pending on the chain
commits_on_chain = subtensor.get_weight_commits(netuid=netuid)
commits_on_chain = subtensor.get_current_weight_commit_info(netuid=netuid)
address, commit, reveal_round = commits_on_chain[0]

# Assert correct values are committed on the chain
Expand Down Expand Up @@ -199,7 +199,7 @@ async def test_commit_and_reveal_weights_cr3(local_chain):
assert weight_vals[0] == revealed_weights[0][1]

# Now that the commit has been revealed, there shouldn't be any pending commits
assert subtensor.get_weight_commits(netuid=netuid) == []
assert subtensor.get_current_weight_commit_info(netuid=netuid) == []

# Ensure the drand_round is always in the positive w.r.t expected when revealed
assert (
Expand Down

0 comments on commit 42e2a0c

Please sign in to comment.