Skip to content

Commit 2ca828d

Browse files
author
µ
committed
sync_substrate.py: in init_runtime(), short circuit when runtime_version is already loaded
1 parent 3090762 commit 2ca828d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

async_substrate_interface/sync_substrate.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -737,6 +737,9 @@ def init_runtime(
737737
f"No runtime information for block '{block_hash}'"
738738
)
739739

740+
if runtime_version == self.runtime_version:
741+
return
742+
740743
runtime = self.runtime_cache.retrieve(runtime_version=runtime_version)
741744
if not runtime or runtime.metadata is None:
742745
self.last_block_hash = block_hash

0 commit comments

Comments
 (0)