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 @@ -996,7 +996,7 @@ async def init_runtime(
996996 return
997997
998998 runtime = self .runtime_cache .retrieve (runtime_version = runtime_version )
999- if not runtime or runtime . metadata is None :
999+ if not runtime :
10001000 self .last_block_hash = block_hash
10011001
10021002 runtime_block_hash = await self .get_parent_block_hash (block_hash )
@@ -1008,6 +1008,11 @@ async def init_runtime(
10081008 metadata = await self .get_block_metadata (
10091009 block_hash = runtime_block_hash , decode = True
10101010 )
1011+ if metadata is None :
1012+ # does this ever happen?
1013+ raise SubstrateRequestException (
1014+ f"No metadata for block '{ runtime_block_hash } '"
1015+ )
10111016 logger .debug (
10121017 "Retrieved metadata for {} from Substrate node" .format (
10131018 runtime_version
You can’t perform that action at this time.
0 commit comments