Skip to content
This repository has been archived by the owner on Nov 24, 2022. It is now read-only.

Commit

Permalink
do not fail to SetProposalCid if bid is already pass the stage
Browse files Browse the repository at this point in the history
Signed-off-by: Merlin Ran <merlinran@gmail.com>
  • Loading branch information
merlinran committed Aug 4, 2021
1 parent 464f657 commit 615fc18
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions service/store/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,10 @@ func (s *Store) SetProposalCid(id auction.BidID, pcid cid.Cid) error {
if err != nil {
return err
}
if b.Status > BidStatusAwaitingProposal {
log.Infof("bid %s already in '%s', duplicated message?", b.ID, b.Status)
return nil
}
if b.Status != BidStatusAwaitingProposal {
return fmt.Errorf("expect bid to have status '%s', got '%s'", BidStatusAwaitingProposal, b.Status)
}
Expand Down

0 comments on commit 615fc18

Please sign in to comment.