chg : minor fix

This commit is contained in:
Shivam Sharma 2022-10-21 04:56:21 +05:30 committed by Jerry
parent 967b20ebf7
commit 06a8f28703

View file

@ -270,6 +270,7 @@ func (api *API) traceChain(ctx context.Context, start, end *types.Block, config
if config == nil {
config = &TraceConfig{
BorTraceEnabled: newBoolPtr(false),
BorTx: newBoolPtr(false),
}
}
// Tracing a chain is a **long** operation, only do with subscriptions
@ -567,6 +568,7 @@ func (api *API) IntermediateRoots(ctx context.Context, hash common.Hash, config
if config == nil {
config = &TraceConfig{
BorTraceEnabled: newBoolPtr(false),
BorTx: newBoolPtr(false),
}
}
@ -668,6 +670,7 @@ func (api *API) traceBlock(ctx context.Context, block *types.Block, config *Trac
if config == nil {
config = &TraceConfig{
BorTraceEnabled: newBoolPtr(false),
BorTx: newBoolPtr(false),
}
}
@ -937,6 +940,7 @@ func (api *API) TraceTransaction(ctx context.Context, hash common.Hash, config *
if config == nil {
config = &TraceConfig{
BorTraceEnabled: newBoolPtr(false),
BorTx: newBoolPtr(false),
}
}
tx, blockHash, blockNumber, index, err := api.backend.GetTransaction(ctx, hash)
@ -1078,6 +1082,10 @@ func (api *API) traceTx(ctx context.Context, message core.Message, txctx *Contex
var result *core.ExecutionResult
if config.BorTx == nil {
config.BorTx = newBoolPtr(false)
}
if *config.BorTx {
callmsg := prepareCallMessage(message)
if result, err = statefull.ApplyBorMessage(*vmenv, callmsg); err != nil {