diff --git a/internal/gui/account.go b/internal/gui/account.go index ca83a501..c530c826 100644 --- a/internal/gui/account.go +++ b/internal/gui/account.go @@ -30,7 +30,6 @@ type accountPageData struct { // a valid address with associated account information is provided, // otherwise renders the index template with an appropriate error message. func (ui *GUI) account(w http.ResponseWriter, r *http.Request) { - address := r.FormValue("address") if address == "" { ui.renderIndex(w, r, "No address provided") @@ -88,7 +87,6 @@ func (ui *GUI) account(w http.ResponseWriter, r *http.Request) { // address has an account on the server a "200 OK" response is returned, // otherwise a "400 Bad Request" or "404 Not Found" are returned. func (ui *GUI) isPoolAccount(w http.ResponseWriter, r *http.Request) { - address := r.FormValue("address") // Generate the account ID of the provided address. diff --git a/pool/pool_test.go b/pool/pool_test.go index fd89c6b6..f5e01da5 100644 --- a/pool/pool_test.go +++ b/pool/pool_test.go @@ -73,7 +73,6 @@ func teardownBoltDB(db *BoltDB, dbPath string) error { // TestPool runs all pool related tests which require a real database. func TestPool(t *testing.T) { - // All sub-tests to run. All of these tests will be run with a postgres // database and a bolt database. tests := map[string]func(*testing.T){ diff --git a/pool/postgres.go b/pool/postgres.go index bc5d22dd..b85c901f 100644 --- a/pool/postgres.go +++ b/pool/postgres.go @@ -840,7 +840,6 @@ func (db *PostgresDB) persistAcceptedWork(work *AcceptedWork) error { _, err := db.DB.Exec(insertAcceptedWork, work.UUID, work.BlockHash, work.PrevHash, work.Height, work.MinedBy, work.Miner, work.CreatedOn, work.Confirmed) if err != nil { - var pqError *pq.Error if errors.As(err, &pqError) { if pqError.Code.Name() == "unique_violation" { @@ -951,7 +950,6 @@ func (db *PostgresDB) persistJob(job *Job) error { _, err := db.DB.Exec(insertJob, job.UUID, job.Height, job.Header) if err != nil { - var pqError *pq.Error if errors.As(err, &pqError) { if pqError.Code.Name() == "unique_violation" { @@ -1000,7 +998,6 @@ func (db *PostgresDB) persistHashData(hashData *HashData) error { hashData.Miner, hashData.IP, hashData.HashRate.RatString(), hashData.UpdatedOn) if err != nil { - var pqError *pq.Error if errors.As(err, &pqError) { if pqError.Code.Name() == "unique_violation" {