Skip to content

Commit

Permalink
Added possibility to provide existing runtime configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Arjan Zijderveld committed Nov 26, 2020
1 parent 5a377cc commit 5c6dd99
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions substrateinterface/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ def __repr__(self):
class SubstrateInterface:

def __init__(self, url=None, websocket=None, ss58_format=None, type_registry=None, type_registry_preset=None,
cache_region=None, address_type=None):
cache_region=None, address_type=None, runtime_config=None):
"""
A specialized class in interfacing with a Substrate node.
Expand Down Expand Up @@ -430,7 +430,11 @@ def __init__(self, url=None, websocket=None, ss58_format=None, type_registry=Non

self.metadata_cache = {}
self.type_registry_cache = {}
self.runtime_config = RuntimeConfigurationObject()

if not runtime_config:
runtime_config = RuntimeConfigurationObject()

self.runtime_config = runtime_config

self.debug = False

Expand Down

0 comments on commit 5c6dd99

Please sign in to comment.