eth/tracers: move tracing APIs into eth/tracers (#22161)
This moves the tracing RPC API implementation to package eth/tracers. By doing so, package eth no longer depends on tracing and the duktape JS engine. The change also enables tracing using the light client. All tracing methods work with the light client, but it's a lot slower compared to using a full node.
This commit is contained in:
@ -326,3 +326,15 @@ func (b *EthAPIBackend) Miner() *miner.Miner {
|
||||
func (b *EthAPIBackend) StartMining(threads int) error {
|
||||
return b.eth.StartMining(threads)
|
||||
}
|
||||
|
||||
func (b *EthAPIBackend) StateAtBlock(ctx context.Context, block *types.Block, reexec uint64) (*state.StateDB, func(), error) {
|
||||
return b.eth.stateAtBlock(block, reexec)
|
||||
}
|
||||
|
||||
func (b *EthAPIBackend) StatesInRange(ctx context.Context, fromBlock *types.Block, toBlock *types.Block, reexec uint64) ([]*state.StateDB, func(), error) {
|
||||
return b.eth.statesInRange(fromBlock, toBlock, reexec)
|
||||
}
|
||||
|
||||
func (b *EthAPIBackend) StateAtTransaction(ctx context.Context, block *types.Block, txIndex int, reexec uint64) (core.Message, vm.BlockContext, *state.StateDB, func(), error) {
|
||||
return b.eth.stateAtTransaction(block, txIndex, reexec)
|
||||
}
|
||||
|
Reference in New Issue
Block a user