瀏覽代碼

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 年之前
父節點
當前提交
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()