Skip to content

Commit

Permalink
Merge pull request #700 from iotexproject/query-api-test-fix
Browse files Browse the repository at this point in the history
query api test fix
  • Loading branch information
huangzhiran authored Oct 14, 2024
2 parents 2033c45 + 84987f4 commit 86f404f
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cmd/apinode/persistence/postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ func (p *Persistence) UpsertSettledTask(projectID uint64, taskID common.Hash) er
}
err := p.db.Clauses(clause.OnConflict{
Columns: []clause.Column{{Name: "task_id"}, {Name: "project_id"}},
DoUpdates: clause.AssignmentColumns([]string{}),
DoNothing: true,
}).Create(&t).Error
return errors.Wrap(err, "failed to upsert settled task")
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/prover/db/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ func (p *DB) CreateTask(projectID uint64, taskID common.Hash, prover common.Addr
}
err := p.db.Clauses(clause.OnConflict{
Columns: []clause.Column{{Name: "task_id"}, {Name: "project_id"}},
DoUpdates: clause.AssignmentColumns([]string{}),
DoNothing: true,
}).Create(&t).Error
return errors.Wrap(err, "failed to upsert task")
}
Expand Down
1 change: 1 addition & 0 deletions cmd/sequencer/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ var (
BootNodeMultiAddr: "/dns4/bootnode-0.testnet.iotex.one/tcp/4689/ipfs/12D3KooWFnaTYuLo8Mkbm3wzaWHtUuaxBRe24Uiopu15Wr5EhD3o",
IoTeXChainID: 2,
ChainEndpoint: "https://babel-api.testnet.iotex.io",
OperatorPrvKey: "33e6ba3e033131026903f34dfa208feb88c284880530cf76280b68d38041c67b",
ProverContractAddr: "0xf9b850A50Ef236CADf4406Edf5a0B588142D238D",
DaoContractAddr: "0xA7b3c2a257693363a9f043CC9338DbA88E1f83aF",
MinterContractAddr: "0x102a1352557B3f6c65FBb44bF7959F8eacC30992",
Expand Down
5 changes: 0 additions & 5 deletions task/assigner/assigner.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,11 @@ import (
"github.com/pkg/errors"
"golang.org/x/exp/rand"

"github.com/ethereum/go-ethereum/log"
"github.com/iotexproject/w3bstream/block"
"github.com/iotexproject/w3bstream/cmd/sequencer/api"
"github.com/iotexproject/w3bstream/smartcontracts/go/minter"
)

func init() {
log.Root().SetHandler(log.StdoutHandler)
}

type DB interface {
BlockHead() (uint64, common.Hash, error)
NBits() (uint32, error)
Expand Down

0 comments on commit 86f404f

Please sign in to comment.