|
|
@ -1452,11 +1452,15 @@ func (bc *BlockChain) insertChain(chain types.Blocks, verifyHeaders bool) (int, |
|
|
|
} |
|
|
|
} |
|
|
|
vmConfig := bc.vmConfig |
|
|
|
vmConfig := bc.vmConfig |
|
|
|
if bc.trace { |
|
|
|
if bc.trace { |
|
|
|
vmConfig = vm.Config{ |
|
|
|
ev := TraceEvent{ |
|
|
|
Debug: true, |
|
|
|
Block: block, |
|
|
|
|
|
|
|
|
|
|
|
Tracer: &tracers.ParityBlockTracer{}, |
|
|
|
Tracer: &tracers.ParityBlockTracer{}, |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
vmConfig = vm.Config{ |
|
|
|
|
|
|
|
Debug: true, |
|
|
|
|
|
|
|
Tracer: ev.Tracer, |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
events = append(events, ev) |
|
|
|
} |
|
|
|
} |
|
|
|
// Process block using the parent state as reference point.
|
|
|
|
// Process block using the parent state as reference point.
|
|
|
|
receipts, cxReceipts, logs, usedGas, payout, err := bc.processor.Process( |
|
|
|
receipts, cxReceipts, logs, usedGas, payout, err := bc.processor.Process( |
|
|
@ -1483,12 +1487,6 @@ func (bc *BlockChain) insertChain(chain types.Blocks, verifyHeaders bool) (int, |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
return i, events, coalescedLogs, err |
|
|
|
return i, events, coalescedLogs, err |
|
|
|
} |
|
|
|
} |
|
|
|
if bc.trace { |
|
|
|
|
|
|
|
bc.PostChainEvents([]interface{}{TraceEvent{ |
|
|
|
|
|
|
|
Block: block, |
|
|
|
|
|
|
|
Tracer: vmConfig.Tracer.(*tracers.ParityBlockTracer), |
|
|
|
|
|
|
|
}}, nil) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
logger := utils.Logger().With(). |
|
|
|
logger := utils.Logger().With(). |
|
|
|
Str("number", block.Number().String()). |
|
|
|
Str("number", block.Number().String()). |
|
|
|
Str("hash", block.Hash().Hex()). |
|
|
|
Str("hash", block.Hash().Hex()). |
|
|
|