fix: lints

This commit is contained in:
Andrew Jackson (Ajax) 2023-11-25 09:15:09 -06:00
parent 9f9af40d3b
commit 5120add25a
4 changed files with 11 additions and 6 deletions

View File

@ -107,7 +107,10 @@ var wdPostTaskCmd = &cli.Command{
var result string
for {
time.Sleep(time.Second)
deps.db.QueryRow(ctx, `SELECT result FROM harmony_test WHERE task_id=$1`, id).Scan(&result)
err = deps.db.QueryRow(ctx, `SELECT result FROM harmony_test WHERE task_id=$1`, id).Scan(&result)
if err != nil {
return xerrors.Errorf("reading result from harmony_test: %w", err)
}
if result != "" {
break
}

View File

@ -4,8 +4,6 @@ import (
"context"
"time"
logging "github.com/ipfs/go-log/v2"
"github.com/filecoin-project/lotus/api"
"github.com/filecoin-project/lotus/lib/harmony/harmonydb"
"github.com/filecoin-project/lotus/node/config"
@ -19,7 +17,7 @@ import (
"github.com/filecoin-project/lotus/storage/sealer/storiface"
)
var log = logging.Logger("provider")
//var log = logging.Logger("provider")
func WindowPostScheduler(ctx context.Context, fc config.LotusProviderFees, pc config.ProvingConfig,
api api.FullNode, verif storiface.Verifier, lw *sealer.LocalWorker,

View File

@ -164,7 +164,10 @@ func (s *Sender) Send(ctx context.Context, msg *types.Message, mss *api.MessageS
return false, xerrors.Errorf("marshaling message: %w", err)
}
id := ctx.Value(CtxTestTaskID)
tx.Exec(`UPDATE harmony_test SET result=$1 WHERE task_id=$2`, string(data), id)
_, err = tx.Exec(`UPDATE harmony_test SET result=$1 WHERE task_id=$2`, string(data), id)
if err != nil {
return false, xerrors.Errorf("updating harmony_test: %w", err)
}
log.Infof("SKIPPED sending test message to chain. Query harmony_test WHERE task_id= %v", id)
return true, nil // nothing committed
}

View File

@ -2,8 +2,8 @@ package fr32_test
import (
"bytes"
"crypto/rand"
"io"
"math/rand"
"os"
"testing"
@ -70,6 +70,7 @@ func TestPadChunkFFI(t *testing.T) {
}
func TestPadChunkRandEqFFI(t *testing.T) {
for i := 0; i < 200; i++ {
var input [127]byte
rand.Read(input[:])