move comment

This commit is contained in:
Sina Mahmoodi 2023-11-30 18:45:41 +03:30 committed by GitHub
parent d7702cfb13
commit 7eb6b0bc56
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -864,6 +864,10 @@ func (api *API) TraceTransaction(ctx context.Context, hash common.Hash, config *
// TraceCall lets you trace a given eth_call. It collects the structured logs // TraceCall lets you trace a given eth_call. It collects the structured logs
// created during the execution of EVM if the given transaction was added on // created during the execution of EVM if the given transaction was added on
// top of the provided block and returns them as a JSON object. // top of the provided block and returns them as a JSON object.
// If no transaction index is specified, the trace will be conducted on the state
// after executing the specified block. However, if a transaction index is provided,
// the trace will be conducted on the state after executing the specified transaction
// within the specified block.
func (api *API) TraceCall(ctx context.Context, args ethapi.TransactionArgs, blockNrOrHash rpc.BlockNumberOrHash, config *TraceCallConfig) (interface{}, error) { func (api *API) TraceCall(ctx context.Context, args ethapi.TransactionArgs, blockNrOrHash rpc.BlockNumberOrHash, config *TraceCallConfig) (interface{}, error) {
// Try to retrieve the specified block // Try to retrieve the specified block
var ( var (
@ -896,14 +900,6 @@ func (api *API) TraceCall(ctx context.Context, args ethapi.TransactionArgs, bloc
reexec = *config.Reexec reexec = *config.Reexec
} }
// If no transaction index is specified, the trace will be conducted on the state
// after executing the specified block. However, if a transaction index is provided,
// the trace will be conducted on the state after executing the specified transaction
// within the specified block.
// When "latest" is used without a transaction index, it means that the simulation is
// done on the state after the latest block execution. Conversely, when "latest" is used
// with a transaction index, it indicates simulating on the intermediate state after a
// specific transaction within the most recent block.
if config != nil && config.TxIndex != nil { if config != nil && config.TxIndex != nil {
_, _, statedb, release, err = api.backend.StateAtTransaction(ctx, block, int(*config.TxIndex), reexec) _, _, statedb, release, err = api.backend.StateAtTransaction(ctx, block, int(*config.TxIndex), reexec)
} else { } else {