File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -349,6 +349,19 @@ func (c *Chains) StopAll() {
349349 c .chainConfigs = make (map [string ]* uregistrytypes.ChainConfig )
350350}
351351
352+ // GetClient returns the chain client for the specified chain ID
353+ func (c * Chains ) GetClient (chainID string ) (common.ChainClient , error ) {
354+ c .chainsMu .RLock ()
355+ defer c .chainsMu .RUnlock ()
356+
357+ client , exists := c .chains [chainID ]
358+ if ! exists {
359+ return nil , fmt .Errorf ("chain client not found for chain %s" , chainID )
360+ }
361+
362+ return client , nil
363+ }
364+
352365// getChainDB returns a database instance for a specific chain
353366func (c * Chains ) getChainDB (chainID string ) (* db.DB , error ) {
354367 // Create database file directly named after the chain's CAIP-2 format
You can’t perform that action at this time.
0 commit comments