Skip to content

Commit 014d32a

Browse files
author
µ
committed
sync_substrate.py: drop return value from init_runtime()
1 parent 6d0c878 commit 014d32a

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

async_substrate_interface/sync_substrate.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -779,8 +779,6 @@ def init_runtime(
779779
metadata_v15=runtime.metadata_v15,
780780
)
781781

782-
return runtime
783-
784782
def create_storage_key(
785783
self,
786784
pallet: str,
@@ -1920,10 +1918,10 @@ def create_scale_object(
19201918
Returns:
19211919
The created Scale Type object
19221920
"""
1923-
runtime = self.init_runtime(block_hash=block_hash)
1921+
self.init_runtime(block_hash=block_hash)
19241922

19251923
if "metadata" not in kwargs:
1926-
kwargs["metadata"] = runtime.metadata
1924+
kwargs["metadata"] = self.runtime.metadata
19271925

19281926
return runtime.runtime_config.create_scale_object(
19291927
type_string, data=data, **kwargs
@@ -2893,9 +2891,9 @@ def get_metadata_call_function(
28932891
Returns:
28942892
list of call functions
28952893
"""
2896-
runtime = self.init_runtime(block_hash=block_hash)
2894+
self.init_runtime(block_hash=block_hash)
28972895

2898-
for pallet in runtime.metadata.pallets:
2896+
for pallet in self.runtime.metadata.pallets:
28992897
if pallet.name == module_name and pallet.calls:
29002898
for call in pallet.calls:
29012899
if call.name == call_function_name:

0 commit comments

Comments
 (0)