Skip to content

Commit 44e8a6a

Browse files
committed
feat: remove fatal on debugTrace
1 parent 7e47af8 commit 44e8a6a

File tree

3 files changed

+0
-13
lines changed

3 files changed

+0
-13
lines changed

bridgesync/downloader.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -581,14 +581,9 @@ func findCall(rootCall Call, targetAddr common.Address, callback func(Call) (boo
581581
return nil, db.ErrNotFound
582582
}
583583

584-
var AllowDebugTraceCalls = true
585-
586584
// extractRootCall extracts the root call for a transaction using debug_traceTransaction.
587585
func extractRootCall(client aggkittypes.RPCClienter, contractAddr common.Address, txHash common.Hash) (*Call, error) {
588586
rootCall := &Call{To: contractAddr}
589-
if !AllowDebugTraceCalls {
590-
logger.Fatal("*** USE DEBUG_TRACE :extractRootCall: " + DebugTraceTxEndpoint)
591-
}
592587
err := client.Call(rootCall, DebugTraceTxEndpoint, txHash, tracerCfg{Tracer: callTracerType})
593588
if err != nil {
594589
return nil, err

claimsync/downloader.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -430,14 +430,9 @@ func findCall(rootCall Call,
430430
return nil, db.ErrNotFound
431431
}
432432

433-
var AllowDebugTraceCalls = true
434-
435433
// extractRootCall extracts the root call for a transaction using debug_traceTransaction.
436434
func extractRootCall(client aggkittypes.RPCClienter, contractAddr common.Address, txHash common.Hash) (*Call, error) {
437435
rootCall := &Call{To: contractAddr}
438-
if !AllowDebugTraceCalls {
439-
log.Fatal("*** USE DEBUG_TRACE :extractRootCall: " + DebugTraceTxEndpoint)
440-
}
441436
err := client.Call(rootCall, DebugTraceTxEndpoint, txHash, tracerCfg{Tracer: callTracerType})
442437
if err != nil {
443438
return nil, err

cmd/run.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,6 @@ func start(cliCtx *cli.Context) error {
9090
prometheus.Init()
9191
}
9292
log.Debugf("Components to run: %v", components)
93-
isBridgeRunning := isNeeded([]string{aggkitcommon.BRIDGE}, components)
94-
bridgesync.AllowDebugTraceCalls = isBridgeRunning
95-
claimsync.AllowDebugTraceCalls = isBridgeRunning
9693

9794
l1Client := runL1ClientIfNeeded(cliCtx.Context, cfg.L1NetworkConfig.RPC)
9895
l2Client := runL2ClientIfNeeded(cliCtx.Context, components, cfg.Common.L2RPC)

0 commit comments

Comments
 (0)