Skip to content

Commit 49fc471

Browse files
committed
Sync optimised actually
1 parent b84c4c2 commit 49fc471

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

async_substrate_interface/sync_substrate.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -755,7 +755,8 @@ def init_runtime(
755755
self.runtime = runtime
756756
return runtime
757757
else:
758-
return self.get_runtime_for_version(runtime_version, block_hash)
758+
self.runtime = self.get_runtime_for_version(runtime_version, block_hash)
759+
return self.runtime
759760

760761
def get_runtime_for_version(
761762
self, runtime_version: int, block_hash: Optional[str] = None
@@ -2524,13 +2525,13 @@ def runtime_call(
25242525
for idx, param in enumerate(runtime_call_def["inputs"]):
25252526
param_type_string = f"scale_info::{param['ty']}"
25262527
if isinstance(params, list):
2527-
param_data += self.encode_scale(param_type_string, params[idx])
2528+
param_data += self.encode_scale(param_type_string, params[idx], runtime=runtime)
25282529
else:
25292530
if param["name"] not in params:
25302531
raise ValueError(f"Runtime Call param '{param['name']}' is missing")
25312532

25322533
param_data += self.encode_scale(
2533-
param_type_string, params[param["name"]]
2534+
param_type_string, params[param["name"]], runtime=runtime
25342535
)
25352536

25362537
# RPC request

0 commit comments

Comments
 (0)