Conversation
…ith Async. Not perfect with sync.
|
from dataclasses import dataclass
@dataclass()
class RetrySubstrateArgs:
main_endpoint: str # initial endpoint
fallback_chains: list[str] # endpoints for reconnection
retry_attempts: int # amount of connections before fail (if 0 then infinite)
safety_substrate: Optional["RetrySubstrateArgs"] = None`for if safety_substrate and is_instance(safety_substrate, RetrySubstrateArgs):
self.substrate = RetrySubstrate(..., safety_substrate: "RetrySubstrateArgs" = safety_substrate)
else:
self.substrate = SubstrateInterface(...)Since the use of Let's move logic |
Will move majority of that logic to opentensor/async-substrate-interface#100 |
|
Moved the entire thing to opentensor/async-substrate-interface#100 |
Resolves #2533
Requires opentensor/async-substrate-interface#96
Currently Proof of concept for fallback networks. Not tested or working with Async. Not perfect with sync.