Procházet zdrojové kódy

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 před 1 rokem
rodič
revize
34e0fdd7be
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  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()