File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
async_substrate_interface Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -741,7 +741,7 @@ def init_runtime(
741741 return
742742
743743 runtime = self .runtime_cache .retrieve (runtime_version = runtime_version )
744- if not runtime or runtime . metadata is None :
744+ if not runtime :
745745 self .last_block_hash = block_hash
746746
747747 runtime_block_hash = self .get_parent_block_hash (block_hash )
@@ -751,6 +751,11 @@ def init_runtime(
751751 metadata = self .get_block_metadata (
752752 block_hash = runtime_block_hash , decode = True
753753 )
754+ if metadata is None :
755+ # does this ever happen?
756+ raise SubstrateRequestException (
757+ f"No metadata for block '{ runtime_block_hash } '"
758+ )
754759 logger .debug (
755760 "Retrieved metadata for {} from Substrate node" .format (
756761 runtime_version
You can’t perform that action at this time.
0 commit comments