revert using vdb fork of geth

This commit is contained in:
i-norden 2023-04-09 12:11:46 -05:00
parent 4a4ae2f2ea
commit a1e3f601b1

View File

@ -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",
Port: 8077,
DatabaseName: "cerc_testing",
Username: "vdbm",
Password: "password",
Port: 8077,
Driver: "SQLX",
}.WithEnv()
)
*/
// 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