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

explorerd/service: removed ducktape

This commit removes temp workaround while code was being updated to apply state changes to WASM runtime during block sync.
kalm 1 год назад
Родитель
Сommit
fc79636cda
1 измененных файлов с 2 добавлено и 13 удалено
  1. 2 13
      bin/explorer/explorerd/src/service/transactions.rs

+ 2 - 13
bin/explorer/explorerd/src/service/transactions.rs

@@ -299,19 +299,8 @@ impl ExplorerService {
                 idx as u8,
                 idx as u8,
             )?;
             )?;
 
 
-            // TODO: This is duck taping so explorer doesn't error out and hang.
-            // This whole process needs to be refactored, as explorer doesn't keep
-            // state, therefore this can fail. Apart from that, exec and apply
-            // contract functions are not counted in the gas consumption.
-            let Ok(metadata) = runtime.metadata(&payload) else {
-                return Ok(GasData {
-                    paid: 0,
-                    wasm: 0,
-                    zk_circuits: 0,
-                    signatures: 0,
-                    deployments: 0,
-                })
-            };
+            // Retrieve the runtime metadata
+            let metadata = runtime.metadata(&payload)?;
 
 
             // Decode the metadata retrieved from the execution
             // Decode the metadata retrieved from the execution
             let mut decoder = Cursor::new(&metadata);
             let mut decoder = Cursor::new(&metadata);