Skip to content

Commit

Permalink
feat: add logs to markets event handler
Browse files Browse the repository at this point in the history
  • Loading branch information
arajasek committed Sep 16, 2022
1 parent 7663ec2 commit 8d26d14
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion chain/events/events_called.go
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ func (me *messageEvents) Called(ctx context.Context, check CheckFunc, msgHnd Msg

id, err := me.hcAPI.onHeadChanged(ctx, check, hnd, rev, confidence, timeout)
if err != nil {
return err
return xerrors.Errorf("on head changed error: %w", err)
}

me.lk.Lock()
Expand Down
8 changes: 4 additions & 4 deletions markets/storageadapter/ondealsectorcommitted.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func (mgr *SectorCommittedManager) OnDealSectorPreCommitted(ctx context.Context,
// Note: the error returned from here will end up being returned
// from OnDealSectorPreCommitted so no need to call the callback
// with the error
return false, false, err
return false, false, xerrors.Errorf("failed to check deal activity: %w", err)
}

if isActive {
Expand All @@ -89,7 +89,7 @@ func (mgr *SectorCommittedManager) OnDealSectorPreCommitted(ctx context.Context,

diff, err := mgr.dpc.diffPreCommits(ctx, provider, dealInfo.PublishMsgTipSet, ts.Key())
if err != nil {
return false, false, err
return false, false, xerrors.Errorf("failed to diff precommits: %w", err)
}

for _, info := range diff.Added {
Expand Down Expand Up @@ -139,7 +139,7 @@ func (mgr *SectorCommittedManager) OnDealSectorPreCommitted(ctx context.Context,
// current deal ID from the publish message CID
res, err := mgr.dealInfo.GetCurrentDealInfo(ctx, ts.Key(), &proposal, publishCid)
if err != nil {
return false, err
return false, xerrors.Errorf("failed to get dealinfo: %w", err)
}

// If this is a replica update method that succeeded the deal is active
Expand All @@ -159,7 +159,7 @@ func (mgr *SectorCommittedManager) OnDealSectorPreCommitted(ctx context.Context,
// Extract the message parameters
sn, err := dealSectorInPreCommitMsg(msg, res)
if err != nil {
return false, err
return false, xerrors.Errorf("failed to extract message params: %w", err)
}

if sn != nil {
Expand Down

0 comments on commit 8d26d14

Please sign in to comment.