Skip to content

Commit

Permalink
debug_backtraceAt (paradigmxyz#4232)
Browse files Browse the repository at this point in the history
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
  • Loading branch information
2 people authored and alessandromazza98 committed Aug 19, 2023
1 parent 9977721 commit b6f6a6a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions crates/rpc/rpc-api/src/debug.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,4 +123,10 @@ pub trait DebugApi {
opts: Option<GethDebugTracingOptions>,
state_override: Option<StateOverride>,
) -> RpcResult<Vec<GethTrace>>;

/// Sets the logging backtrace location. When a backtrace location is set and a log message is
/// emitted at that location, the stack of the goroutine executing the log statement will
/// be printed to stderr.
#[method(name = "backtraceAt")]
async fn debug_backtrace_at(&self, location: &str) -> RpcResult<()>;
}
1 change: 1 addition & 0 deletions crates/rpc/rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ reth-tasks.workspace = true
reth-metrics.workspace = true
reth-consensus-common = { path = "../../consensus/common" }
reth-rpc-types-compat.workspace = true
lazy_static = "*"

# eth
revm = { workspace = true, features = [
Expand Down
4 changes: 4 additions & 0 deletions crates/rpc/rpc/src/debug.rs
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,10 @@ where
Ok(res.into())
}

async fn debug_backtrace_at(&self, _location: &str) -> RpcResult<()> {
Ok(())
}

/// Handler for `debug_getRawBlock`
async fn raw_block(&self, block_id: BlockId) -> RpcResult<Bytes> {
let block = self.inner.provider.block_by_id(block_id).to_rpc_result()?;
Expand Down

0 comments on commit b6f6a6a

Please sign in to comment.