Skip to content

Commit 5e912de

Browse files
authored
fix: array out of bounds (#648)
1 parent 8969765 commit 5e912de

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

storagemarket/helper.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ func (c *ChainDealManager) dealIDFromPublishDealsMsg(ctx context.Context, tok ct
169169
if outIdx >= len(dealIDs) {
170170
return dealID, ctypes.EmptyTSK, fmt.Errorf("invalid publish storage deals ret marking %d as valid while only returning %d valid deals in publish deal message %s", outIdx, len(dealIDs), publishCid)
171171
}
172-
return dealIDs[dealIdx], wmsg.TipSet, nil
172+
return dealIDs[outIdx], wmsg.TipSet, nil
173173
}
174174
func (c *ChainDealManager) CheckDealEquality(ctx context.Context, tok ctypes.TipSetKey, p1, p2 market.DealProposal) (bool, error) {
175175
p1ClientID, err := c.fullnodeApi.StateLookupID(ctx, p1.Client, tok)

0 commit comments

Comments
 (0)