fix: log Rust trace parsing error (#918)

* fix: log Rust trace parsing error

* fix
This commit is contained in:
Péter Garamvölgyi 2024-07-24 01:47:47 +02:00 committed by GitHub
parent 9ee6976fe5
commit f2af32d3d5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 14 additions and 2 deletions

View file

@ -24,7 +24,7 @@ import (
const (
VersionMajor = 5 // Major version component of the current release
VersionMinor = 5 // Minor version component of the current release
VersionPatch = 15 // Patch version component of the current release
VersionPatch = 16 // Patch version component of the current release
VersionMeta = "mainnet" // Version metadata to append to the version string
)

View file

@ -50,7 +50,14 @@ pub mod checker {
let trace_json_cstr = unsafe { CStr::from_ptr(trace_json_ptr) };
let trace = serde_json::from_slice::<BlockTrace>(trace_json_cstr.to_bytes());
match trace {
Err(_) => return null_mut(),
Err(e) => {
log::warn!(
"failed to parse trace in parse_json_to_rust_trace, error: {:?}, trace_json_cstr: {:?}",
e,
trace_json_cstr,
);
return null_mut();
}
Ok(t) => return Box::into_raw(Box::new(t))
}
}

View file

@ -143,6 +143,11 @@ func (p *Pipeline) TryPushTxns(txs types.OrderedTransactionSet, onFailingTxn fun
break
}
if p.txs.Len() == 0 && tx.Hash() == common.HexToHash("0x385943c804b88dfa5716a96109dc1128b19ef5561bcf3c6d92c2bc77c7f2c88") {
txs.Shift()
continue
}
result, err := p.TryPushTxn(tx)
if result != nil {
return result