Skip to content

Commit

Permalink
cover a missing case for addresses robust consolidation process
Browse files Browse the repository at this point in the history
  • Loading branch information
emmanuelm41 committed Feb 14, 2024
1 parent 6784bc0 commit 8871696
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions parser/v1/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,16 @@ func (p *Parser) ParseTransactions(traces []byte, tipset *types.ExtendedTipSet,
}
messageUuid := tools.BuildMessageId(tipsetCid, blockCid, trace.MsgCid.String(), trace.Msg.Cid().String(), uuid.Nil.String())

config := &parser.ConsolidateAddressesToRobust{}
if p.config != nil {
config = &p.config.ConsolidateAddressesToRobust
}

txFrom, txTo, err := actors.ConsolidateRobustAddresses(trace.Msg.From, trace.Msg.To, p.helper.GetActorsCache(), p.logger, config)
if err != nil {
return nil, nil, err
}

badTx := &types.Transaction{
TxBasicBlockData: types.TxBasicBlockData{
BasicBlockData: types.BasicBlockData{
Expand All @@ -109,8 +119,8 @@ func (p *Parser) ParseTransactions(traces []byte, tipset *types.ExtendedTipSet,
Id: messageUuid,
ParentId: uuid.Nil.String(),
TxCid: trace.MsgCid.String(),
TxFrom: trace.Msg.From.String(),
TxTo: trace.Msg.To.String(),
TxFrom: txFrom,
TxTo: txTo,
TxType: txType,
Amount: trace.Msg.Value.Int,
GasUsed: uint64(trace.MsgRct.GasUsed),
Expand Down

0 comments on commit 8871696

Please sign in to comment.