Skip to content
Merged
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
9 changes: 2 additions & 7 deletions bittensor/utils/async_substrate_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -1613,8 +1613,7 @@ async def _process_response(
q = bytes(query_value)
else:
q = query_value
obj = await self.decode_scale(value_scale_type, q, True)
result = obj
result = await self.decode_scale(value_scale_type, q)
if asyncio.iscoroutinefunction(result_handler):
# For multipart responses as a result of subscriptions.
message, bool_result = await result_handler(response, subscription_id)
Expand Down Expand Up @@ -2346,7 +2345,6 @@ async def get_constant(
return await self.decode_scale(
constant.type,
bytes(constant.constant_value),
return_scale_obj=True,
)
else:
return None
Expand Down Expand Up @@ -2571,7 +2569,6 @@ def concat_hash_len(key_hasher: str) -> int:
item_key_obj = await self.decode_scale(
type_string=f"({', '.join(key_type_string)})",
scale_bytes=bytes.fromhex(item[0][len(prefix) :]),
return_scale_obj=True,
)

# strip key_hashers to use as item key
Expand All @@ -2592,9 +2589,7 @@ def concat_hash_len(key_hasher: str) -> int:
item_bytes = hex_to_bytes(item[1])

item_value = await self.decode_scale(
type_string=value_type,
scale_bytes=item_bytes,
return_scale_obj=True,
type_string=value_type, scale_bytes=item_bytes
)
except Exception as _:
if not ignore_decoding_errors:
Expand Down