Skip to content

Commit

Permalink
do not return early (#276)
Browse files Browse the repository at this point in the history
  • Loading branch information
LexLuthr authored Oct 14, 2024
1 parent 1992830 commit a488679
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tasks/message/watch.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ func (mw *MessageWatcher) update() {
look, err := mw.api.StateSearchMsg(ctx, lbtsk, cid.MustParse(msg.Cid), api.LookbackNoLimit, true)
if err != nil {
log.Errorf("failed to search for message: %+v", err)
return
continue
}

if look == nil {
Expand All @@ -161,19 +161,19 @@ func (mw *MessageWatcher) update() {
tskCid, err := look.TipSet.Cid()
if err != nil {
log.Errorf("failed to get tipset cid: %+v", err)
return
continue
}

emsg, err := mw.api.ChainGetMessage(ctx, look.Message)
if err != nil {
log.Errorf("failed to get message: %+v", err)
return
continue
}

execMsg, err := json.Marshal(emsg)
if err != nil {
log.Errorf("failed to marshal message: %+v", err)
return
continue
}

// record in db
Expand All @@ -188,7 +188,7 @@ func (mw *MessageWatcher) update() {
msg.Cid)
if err != nil {
log.Errorf("failed to update message wait: %+v", err)
return
continue
}
}
}
Expand Down

0 comments on commit a488679

Please sign in to comment.