get deal proposal

This commit is contained in:
Jennifer Wang 2022-09-23 16:04:45 -04:00 committed by Aayush
parent 0addc7207e
commit 5f5491a9e5

View File

@ -390,17 +390,17 @@ var clientCmd = &cli.Command{
return xerrors.Errorf("cannot resolve singer: ", ai)
}
if err := dps.ForEach(func(dealID abi.DealID, d market.DealProposal) error {
p, found, _ := dps.Get(dealID)
if found && p.Client == ai {
if d.Client == ai {
if v.OptionID == APPROVE {
acceptanceBytes += p.PieceSize
acceptanceBytes += d.PieceSize
acceptanceCount += 1
} else {
rejectionBytes += p.PieceSize
rejectionBytes += d.PieceSize
rejectionCount += 1
}
}
return xerrors.Errorf("cant get deal ", err)
return nil
}); err != nil {
return err
}