From b65c6e9060406940303ca425ea50a31c5a9bb30b Mon Sep 17 00:00:00 2001 From: Ignacio Hagopian Date: Tue, 11 Jan 2022 16:58:39 -0300 Subject: [PATCH] change ifs logic Signed-off-by: Ignacio Hagopian --- lib/filclient/filclient.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/filclient/filclient.go b/lib/filclient/filclient.go index 31e81bf..dff8df4 100644 --- a/lib/filclient/filclient.go +++ b/lib/filclient/filclient.go @@ -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(