mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-10 14:03:46 +00:00
fix: log Rust trace parsing error (#918)
* fix: log Rust trace parsing error * fix
This commit is contained in:
parent
9ee6976fe5
commit
f2af32d3d5
3 changed files with 14 additions and 2 deletions
|
|
@ -24,7 +24,7 @@ import (
|
||||||
const (
|
const (
|
||||||
VersionMajor = 5 // Major version component of the current release
|
VersionMajor = 5 // Major version component of the current release
|
||||||
VersionMinor = 5 // Minor 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
|
VersionMeta = "mainnet" // Version metadata to append to the version string
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,14 @@ pub mod checker {
|
||||||
let trace_json_cstr = unsafe { CStr::from_ptr(trace_json_ptr) };
|
let trace_json_cstr = unsafe { CStr::from_ptr(trace_json_ptr) };
|
||||||
let trace = serde_json::from_slice::<BlockTrace>(trace_json_cstr.to_bytes());
|
let trace = serde_json::from_slice::<BlockTrace>(trace_json_cstr.to_bytes());
|
||||||
match trace {
|
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))
|
Ok(t) => return Box::into_raw(Box::new(t))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -143,6 +143,11 @@ func (p *Pipeline) TryPushTxns(txs types.OrderedTransactionSet, onFailingTxn fun
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if p.txs.Len() == 0 && tx.Hash() == common.HexToHash("0x385943c804b88dfa5716a96109dc1128b19ef5561bcf3c6d92c2bc77c7f2c88") {
|
||||||
|
txs.Shift()
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
result, err := p.TryPushTxn(tx)
|
result, err := p.TryPushTxn(tx)
|
||||||
if result != nil {
|
if result != nil {
|
||||||
return result
|
return result
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue