mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 23:26:44 +00:00
fix: ccc debug log Rust syntax (#433)
* fix ccc debug log syntax * fix ccc debug log syntax
This commit is contained in:
parent
42e17229d5
commit
37ef8cad30
2 changed files with 4 additions and 10 deletions
|
|
@ -24,7 +24,7 @@ import (
|
|||
const (
|
||||
VersionMajor = 4 // Major version component of the current release
|
||||
VersionMinor = 3 // Minor version component of the current release
|
||||
VersionPatch = 13 // Patch version component of the current release
|
||||
VersionPatch = 14 // Patch version component of the current release
|
||||
VersionMeta = "sepolia" // Version metadata to append to the version string
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#![feature(once_cell)]
|
||||
|
||||
pub mod checker {
|
||||
use crate::utils::{c_char_to_vec, vec_to_c_char};
|
||||
use crate::utils::{c_char_to_str, c_char_to_vec, vec_to_c_char};
|
||||
use libc::c_char;
|
||||
use prover::zkevm::{CircuitCapacityChecker, RowUsage};
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
|
|
@ -59,11 +59,8 @@ pub mod checker {
|
|||
#[no_mangle]
|
||||
pub unsafe extern "C" fn apply_tx(id: u64, tx_traces: *const c_char) -> *const c_char {
|
||||
let result = panic::catch_unwind(|| {
|
||||
log::debug!("ccc apply_tx raw input, id: {:?}, tx_traces: {:?}", id, c_char_to_str(tx_traces));
|
||||
let tx_traces_vec = c_char_to_vec(tx_traces);
|
||||
|
||||
let traces_str = String::from_utf8(tx_traces_vec).expect("cannot decode trace as UTF-8 in apply_tx");
|
||||
log::debug!("ccc apply_tx raw input, id: {:?}, tx_traces: {:?}", id, traces_str);
|
||||
|
||||
let traces = serde_json::from_slice::<BlockTrace>(&tx_traces_vec)
|
||||
.unwrap_or_else(|_| panic!("id: {id:?}, fail to deserialize tx_traces"));
|
||||
if traces.transactions.len() != 1 {
|
||||
|
|
@ -117,11 +114,8 @@ pub mod checker {
|
|||
#[no_mangle]
|
||||
pub unsafe extern "C" fn apply_block(id: u64, block_trace: *const c_char) -> *const c_char {
|
||||
let result = panic::catch_unwind(|| {
|
||||
log::debug!("ccc apply_block raw input, id: {:?}, block_trace: {:?}", id, c_char_to_str(block_trace));
|
||||
let block_trace = c_char_to_vec(block_trace);
|
||||
|
||||
let traces_str = String::from_utf8(block_trace).expect("cannot decode trace as UTF-8 in apply_block");
|
||||
log::debug!("ccc apply_block raw input, id: {:?}, block_trace: {:?}", id, traces_str);
|
||||
|
||||
let traces = serde_json::from_slice::<BlockTrace>(&block_trace)
|
||||
.unwrap_or_else(|_| panic!("id: {id:?}, fail to deserialize block_trace"));
|
||||
CHECKERS
|
||||
|
|
|
|||
Loading…
Reference in a new issue