Просмотр исходного кода

explorer/site: accommodate new RPC parameter handling of numerics

Change the index route code in explore.py to call `get_last_n_blocks` with an integer instead of a string to accommodate the updated RPC layer, which now expects numeric types rather than strings for numbers.
kalm 1 год назад
Родитель
Сommit
34e0fdd7be
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      bin/explorer/site/blueprints/explore.py

+ 1 - 1
bin/explorer/site/blueprints/explore.py

@@ -39,7 +39,7 @@ async def index():
     latest metric statistics (if available), and native contracts.
     """
     # Fetch the latest 10 blocks
-    blocks = await rpc.get_last_n_blocks("10")
+    blocks = await rpc.get_last_n_blocks(10)
 
     # Retrieve basic statistics summarizing the overall chain data
     basic_stats = await rpc.get_basic_statistics()