@@ -2,7 +2,6 @@ package fevmtrace
2
2
3
3
import (
4
4
"context"
5
- "encoding/base64"
6
5
"fmt"
7
6
8
7
"github.com/filecoin-project/go-address"
@@ -110,28 +109,17 @@ func (t *Task) ProcessTipSets(ctx context.Context, current *types.TipSet, execut
110
109
111
110
for _ , parentMsg := range mex {
112
111
// Only handle EVM related message
113
- if ! util .IsEVMAddress (ctx , t .node , parentMsg .Message .From , current .Key ()) && ! util .IsEVMAddress (ctx , t .node , parentMsg .Message .To , current .Key ()) && ! (parentMsg .Message .To != builtintypes .EthereumAddressManagerActorAddr ) {
112
+ if ! util .IsEVMAddress (ctx , t .node , parentMsg .Message .From , current .Key ()) &&
113
+ ! util .IsEVMAddress (ctx , t .node , parentMsg .Message .To , current .Key ()) &&
114
+ parentMsg .Message .To != builtintypes .EthereumAddressManagerActorAddr {
114
115
continue
115
116
}
116
- messageHash , err := ethtypes .EthHashFromCid (parentMsg .Cid )
117
+ transactionHash , err := ethtypes .EthHashFromCid (parentMsg .Cid )
117
118
if err != nil {
118
119
log .Errorf ("Error at finding hash: [cid: %v] err: %v" , parentMsg .Cid , err )
119
120
errs = append (errs , err )
120
121
continue
121
122
}
122
- transaction , err := t .node .EthGetTransactionByHash (ctx , & messageHash )
123
- if err != nil {
124
- log .Errorf ("Error at getting transaction: [hash: %v] err: %v" , messageHash , err )
125
- errs = append (errs , err )
126
- continue
127
- }
128
-
129
- if transaction == nil {
130
- continue
131
- }
132
-
133
- log .Infof ("message: %v, %v" , parentMsg .Cid , base64 .StdEncoding .EncodeToString (parentMsg .Message .Params ))
134
-
135
123
for _ , child := range util .GetChildMessagesOf (parentMsg ) {
136
124
toCode , _ := getActorCode (ctx , child .Message .To )
137
125
@@ -144,7 +132,7 @@ func (t *Task) ProcessTipSets(ctx context.Context, current *types.TipSet, execut
144
132
145
133
traceObj := & fevm.FEVMTrace {
146
134
Height : int64 (parentMsg .Height ),
147
- TransactionHash : transaction . Hash .String (),
135
+ TransactionHash : transactionHash .String (),
148
136
MessageStateRoot : parentMsg .StateRoot .String (),
149
137
MessageCid : parentMsg .Cid .String (),
150
138
TraceCid : getMessageTraceCid (child .Message ).String (),
0 commit comments