Skip to content

Commit

Permalink
rpc/erigon: parse traces geth handle CALLCODE
Browse files Browse the repository at this point in the history
  • Loading branch information
Tangui-Bitfly committed Nov 4, 2024
1 parent c14af4b commit 6bb6221
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rpc/erigon.go
Original file line number Diff line number Diff line change
Expand Up @@ -791,14 +791,14 @@ func (client *ErigonClient) getTraceGeth(blockNumber *big.Int) ([]*Eth1InternalT
switch trace.Type {
case "CREATE2":
trace.Type = "CREATE"
case "CREATE", "SELFDESTRUCT", "SUICIDE", "CALL", "DELEGATECALL", "STATICCALL":
case "CREATE", "SELFDESTRUCT", "SUICIDE", "CALL", "DELEGATECALL", "STATICCALL", "CALLCODE":
case "":
logrus.WithFields(logrus.Fields{"type": trace.Type, "block.Number": blockNumber}).Errorf("geth style trace without type")
spew.Dump(trace)
continue
default:
spew.Dump(trace)
logrus.Fatalf("unknown trace type %v in tx %v", trace.Type, trace.TransactionPosition)
logrus.Fatalf("unknown trace type %v in tx %v:%v", trace.Type, blockNumber.String(), trace.TransactionPosition)
}
if txPosition != trace.TransactionPosition {
txPosition = trace.TransactionPosition
Expand Down

0 comments on commit 6bb6221

Please sign in to comment.