mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-24 05:36:46 +00:00
fix(gethclient): pass common.Hash to debug_traceTransaction for consistency
Unifies hash argument encoding: TraceTransaction now passes common.Hash directly, matching TraceBlock and other RPC calls. Leverages common.Hash JSON marshaling (0x‑prefixed hex via MarshalText); no functional change expected. Aligns with RPC handler signature (tracers.API.TraceBlockByHash(ctx, hash common.Hash, ...)) and existing ethclient usage (e.g., eth_getBlockByHash, eth_getTransactionByHash). Simplifies code by avoiding unnecessary Hex() conversion and improves consistency/readability.
This commit is contained in:
parent
cbbf686ecc
commit
e7e69c53de
1 changed files with 1 additions and 1 deletions
|
|
@ -209,7 +209,7 @@ func (ec *Client) SubscribePendingTransactions(ctx context.Context, ch chan<- co
|
|||
// and returns them as a JSON object.
|
||||
func (ec *Client) TraceTransaction(ctx context.Context, hash common.Hash, config *tracers.TraceConfig) (any, error) {
|
||||
var result any
|
||||
err := ec.c.CallContext(ctx, &result, "debug_traceTransaction", hash.Hex(), config)
|
||||
err := ec.c.CallContext(ctx, &result, "debug_traceTransaction", hash, config)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue