-
Notifications
You must be signed in to change notification settings - Fork 443
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
When using an async subtensor and calling https://github.com/opentensor/bittensor/blob/master/bittensor/core/async_subtensor.py#L2519 with the block parameter the block_hash is received and passed to the following method https://github.com/opentensor/bittensor/blob/master/bittensor/core/async_subtensor.py#L2530.
This eventually calls https://github.com/opentensor/bittensor/blob/master/bittensor/core/async_subtensor.py#L3818 with both block and block_hash.
To Reproduce
import asyncio
from bittensor.core.async_subtensor import AsyncSubtensor
async def main():
async with AsyncSubtensor("wss://archive.chain.opentensor.ai:443") as subtensor:
try:
result = await subtensor.get_neuron_for_pubkey_and_subnet(
hotkey_ss58="5CnvuQgNLBd2tmhykivRfnJZBYc5D2NZEBYxjFm2fc5Msn1o",
netuid=10,
block=6602498,
)
print(result.active)
except Exception as e:
print(e)
return
if __name__ == "__main__":
asyncio.run(main())
Expected behavior
Function should work correctly when block is passed
Screenshots
No response
Environment
Ubuntu
Additional context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working