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

Commit

Permalink
change ifs logic
Browse files Browse the repository at this point in the history
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
  • Loading branch information
jsign committed Jan 11, 2022
1 parent cfc0ee0 commit b65c6e9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/filclient/filclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,17 @@ func (fc *LotusFilClient) VerifyBidder(
}

okWorker, errVerifySigWorker := fc.verifySignature(mi.Worker, sig, bidderID)
if errVerifySigWorker == nil && okWorker {
return true, nil
}

if errVerifySigOwner != nil && errVerifySigWorker != nil {
return false, fmt.Errorf(
"verifying signature from owner (err: %s) or worker (err: %s) failed",
errVerifySigOwner, errVerifySigWorker)
}

return okWorker, nil
return false, nil
}

func (fc *LotusFilClient) verifySignature(
Expand Down

0 comments on commit b65c6e9

Please sign in to comment.