163163 price_to_tick ,
164164 tick_to_price ,
165165)
166- from bittensor . utils . retry import retry_call
166+
167167
168168if TYPE_CHECKING :
169169 from async_substrate_interface .sync_substrate import QueryMapResult
@@ -564,19 +564,11 @@ def get_hyperparameter(
564564 logging .error (f"subnet { netuid } does not exist" )
565565 return None
566566
567- result = retry_call (
568- self .substrate .query ,
567+ result = self .substrate .query (
569568 module = "SubtensorModule" ,
570569 storage_function = param_name ,
571570 params = [netuid ],
572571 block_hash = block_hash ,
573- retry_exceptions = (
574- SubstrateRequestException ,
575- ConnectionRefusedError ,
576- TimeoutError ,
577- BrokenPipeError ,
578- ConnectionResetError ,
579- ),
580572 )
581573
582574 if result is None :
@@ -719,18 +711,10 @@ def query_constant(
719711 Common types include int (for counts/blocks), Balance objects (for amounts in Rao), and booleans.
720712
721713 """
722- return retry_call (
723- self .substrate .get_constant ,
714+ return self .substrate .get_constant (
724715 module_name = module_name ,
725716 constant_name = constant_name ,
726717 block_hash = self .determine_block_hash (block ),
727- retry_exceptions = (
728- SubstrateRequestException ,
729- ConnectionRefusedError ,
730- TimeoutError ,
731- BrokenPipeError ,
732- ConnectionResetError ,
733- ),
734718 )
735719
736720 def query_map (
@@ -754,19 +738,11 @@ def query_map(
754738 Returns:
755739 QueryMapResult: A data structure representing the map storage if found, None otherwise.
756740 """
757- result = retry_call (
758- self .substrate .query_map ,
741+ result = self .substrate .query_map (
759742 module = module ,
760743 storage_function = name ,
761744 params = params ,
762745 block_hash = self .determine_block_hash (block = block ),
763- retry_exceptions = (
764- SubstrateRequestException ,
765- ConnectionRefusedError ,
766- TimeoutError ,
767- BrokenPipeError ,
768- ConnectionResetError ,
769- ),
770746 )
771747 return result
772748
@@ -789,19 +765,11 @@ def query_map_subtensor(
789765 Returns:
790766 An object containing the map-like data structure, or `None` if not found.
791767 """
792- return retry_call (
793- self .substrate .query_map ,
768+ return self .substrate .query_map (
794769 module = "SubtensorModule" ,
795770 storage_function = name ,
796771 params = params ,
797772 block_hash = self .determine_block_hash (block ),
798- retry_exceptions = (
799- SubstrateRequestException ,
800- ConnectionRefusedError ,
801- TimeoutError ,
802- BrokenPipeError ,
803- ConnectionResetError ,
804- ),
805773 )
806774
807775 def query_module (
@@ -826,22 +794,13 @@ def query_module(
826794 An object containing the requested data if found, `None` otherwise.
827795
828796 """
829- return retry_call (
830- self .substrate .query ,
797+ return self .substrate .query (
831798 module = module ,
832799 storage_function = name ,
833800 params = params ,
834801 block_hash = self .determine_block_hash (block ),
835- retry_exceptions = (
836- SubstrateRequestException ,
837- ConnectionRefusedError ,
838- TimeoutError ,
839- BrokenPipeError ,
840- ConnectionResetError ,
841- ),
842802 )
843803
844-
845804 def query_runtime_api (
846805 self ,
847806 runtime_api : str ,
@@ -864,20 +823,12 @@ def query_runtime_api(
864823
865824 """
866825 block_hash = self .determine_block_hash (block )
867-
868- return retry_call (
869- self .substrate .runtime_call ,
826+
827+ return self .substrate .runtime_call (
870828 api = runtime_api ,
871829 method = method ,
872830 params = params ,
873831 block_hash = block_hash ,
874- retry_exceptions = (
875- SubstrateRequestException ,
876- ConnectionRefusedError ,
877- TimeoutError ,
878- BrokenPipeError ,
879- ConnectionResetError ,
880- ),
881832 ).value
882833
883834 def query_subtensor (
@@ -899,19 +850,11 @@ def query_subtensor(
899850 Returns:
900851 query_response: An object containing the requested data.
901852 """
902- return retry_call (
903- self .substrate .query ,
853+ return self .substrate .query (
904854 module = "SubtensorModule" ,
905855 storage_function = name ,
906856 params = params ,
907857 block_hash = self .determine_block_hash (block ),
908- retry_exceptions = (
909- SubstrateRequestException ,
910- ConnectionRefusedError ,
911- TimeoutError ,
912- BrokenPipeError ,
913- ConnectionResetError ,
914- ),
915858 )
916859
917860 def state_call (
0 commit comments