Skip to content
This repository has been archived by the owner on Aug 8, 2024. It is now read-only.

Fix: Sequential Proof Slowdown #97

Merged
merged 2 commits into from
Aug 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions jprov/server/attestation.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,11 @@ func attest(w *http.ResponseWriter, r *http.Request, cmd *cobra.Command, q *queu
return
}

if upload.Response == nil {
http.Error(*w, fmt.Errorf(upload.Response.RawLog).Error(), http.StatusBadRequest)
return
}

if upload.Response.Code != 0 {
http.Error(*w, fmt.Errorf(upload.Response.RawLog).Error(), http.StatusBadRequest)
return
Expand Down
12 changes: 7 additions & 5 deletions jprov/server/proofs.go
Original file line number Diff line number Diff line change
Expand Up @@ -462,11 +462,13 @@ func postProofs(cmd *cobra.Command, db *leveldb.DB, q *queue.UploadQueue, ctx *u
continue
}

err = postProof(clientCtx, cid, block, db, q, ctx)
if err != nil {
ctx.Logger.Error(fmt.Sprintf("Posting Proof Error: %v", err))
continue
}
go func() {
err = postProof(clientCtx, cid, block, db, q, ctx)
if err != nil {
ctx.Logger.Error(fmt.Sprintf("Posting Proof Error: %v", err))
}
}()

sleep, err := cmd.Flags().GetInt64(types.FlagSleep)
if err != nil {
ctx.Logger.Error(err.Error())
Expand Down
Loading