From f1e5cfd2d29f2a225c405eb939987257162ed4a9 Mon Sep 17 00:00:00 2001 From: emmanuelm41 Date: Fri, 10 May 2024 23:38:42 -0300 Subject: [PATCH] feat: consolidate to robust address on events logs parsing --- parser/v2/parser.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/parser/v2/parser.go b/parser/v2/parser.go index 3ececf14..777b4d13 100644 --- a/parser/v2/parser.go +++ b/parser/v2/parser.go @@ -169,11 +169,17 @@ func (p *Parser) ParseEthLogs(_ context.Context, eventsData types.EventsData) (* cmp.Compare(a.LogIndex, b.LogIndex), ) }) + if err != nil { + p.logger.Errorf("error retrieving selector_sig for hash: %s err: %s", event.SelectorID, err) + } for idx, ethLog := range eventsData.EthLogs { event, err := eventTools.ParseEthLog(eventsData.Tipset, ethLog, p.helper, uint64(idx)) + emitter, err := ethLog.Address.ToFilecoinAddress() if err != nil { - zap.S().Errorf("error retrieving selector_sig for hash: %s err: %s", event.SelectorID, err) + if event.Emitter, err = actors.ConsolidateRobustAddress(emitter, p.helper.GetActorsCache(), p.logger, p.config); err != nil { + return nil, err + } } parsed = append(parsed, event)