Explorar el Código

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 hace 1 año
padre
commit
34e0fdd7be
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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()