mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
Debug traceBlock logging
This commit is contained in:
parent
ee71faed7b
commit
7f4562a425
1 changed files with 5 additions and 0 deletions
|
|
@ -568,6 +568,7 @@ func (api *API) StandardTraceBadBlockToFile(ctx context.Context, hash common.Has
|
||||||
// executes all the transactions contained within. The return value will be one item
|
// executes all the transactions contained within. The return value will be one item
|
||||||
// per transaction, dependent on the requested tracer.
|
// per transaction, dependent on the requested tracer.
|
||||||
func (api *API) traceBlock(ctx context.Context, block *types.Block, config *TraceConfig) ([]*txTraceResult, error) {
|
func (api *API) traceBlock(ctx context.Context, block *types.Block, config *TraceConfig) ([]*txTraceResult, error) {
|
||||||
|
fmt.Printf("DEBUG - traceBlock\n")
|
||||||
if block.NumberU64() == 0 {
|
if block.NumberU64() == 0 {
|
||||||
return nil, errors.New("genesis is not traceable")
|
return nil, errors.New("genesis is not traceable")
|
||||||
}
|
}
|
||||||
|
|
@ -591,6 +592,7 @@ func (api *API) traceBlock(ctx context.Context, block *types.Block, config *Trac
|
||||||
// in separate worker threads.
|
// in separate worker threads.
|
||||||
if config != nil && config.Tracer != nil && *config.Tracer != "" {
|
if config != nil && config.Tracer != nil && *config.Tracer != "" {
|
||||||
if isJS := DefaultDirectory.IsJS(*config.Tracer); isJS {
|
if isJS := DefaultDirectory.IsJS(*config.Tracer); isJS {
|
||||||
|
fmt.Printf("DEBUG - traceBlock - traceBlockParallel\n")
|
||||||
return api.traceBlockParallel(ctx, block, statedb, config)
|
return api.traceBlockParallel(ctx, block, statedb, config)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -603,7 +605,10 @@ func (api *API) traceBlock(ctx context.Context, block *types.Block, config *Trac
|
||||||
signer = types.MakeSigner(api.backend.ChainConfig(), block.Number(), block.Time())
|
signer = types.MakeSigner(api.backend.ChainConfig(), block.Number(), block.Time())
|
||||||
results = make([]*txTraceResult, len(txs))
|
results = make([]*txTraceResult, len(txs))
|
||||||
)
|
)
|
||||||
|
fmt.Printf("DEBUG - traceBlock - block %+v\n", block)
|
||||||
|
fmt.Printf("DEBUG - traceBlock - txs %+v\n", txs)
|
||||||
for i, tx := range txs {
|
for i, tx := range txs {
|
||||||
|
fmt.Printf("DEBUG - traceBlock inner - tx %+v\n", tx.Hash())
|
||||||
// Generate the next state snapshot fast without tracing
|
// Generate the next state snapshot fast without tracing
|
||||||
msg, _ := core.TransactionToMessage(tx, signer, block.BaseFee())
|
msg, _ := core.TransactionToMessage(tx, signer, block.BaseFee())
|
||||||
txctx := &Context{
|
txctx := &Context{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue