Skip to content

Commit

Permalink
revert using vdb fork of geth
Browse files Browse the repository at this point in the history
  • Loading branch information
i-norden committed Apr 9, 2023
1 parent 4a4ae2f commit a1e3f60
Showing 1 changed file with 9 additions and 14 deletions.
23 changes: 9 additions & 14 deletions postgres/shared/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,21 @@ package shared

import (
"github.com/jmoiron/sqlx"

"github.com/ethereum/go-ethereum/statediff/indexer/database/sql/postgres"
)

var (
testDBConfig, _ = postgres.Config{
Hostname: "localhost",
DatabaseName: "cerc_testing",
Username: "vdbm",
Password: "password",
Port: 8077,
Driver: "SQLX",
}.WithEnv()
)

/*
Hostname: "localhost",
Port: 8077,
DatabaseName: "cerc_testing",
Username: "vdbm",
Password: "password",
*/
// TestDB connect to the testing database
// it assumes the database has the IPFS ipld.blocks table present
// DO NOT use a production db for the test db, as it will remove all contents of the ipld.blocks table
func TestDB() (*sqlx.DB, error) {
return sqlx.Connect("postgres", testDBConfig.DbConnectionString())
connectStr := "postgresql://vdbm:password@localhost:8077/cerc_testing?sslmode=disable"
return sqlx.Connect("postgres", connectStr)
}

// ResetTestDB drops all rows in the test db ipld.blocks table
Expand Down

0 comments on commit a1e3f60

Please sign in to comment.