//go:build test_db_postgres || test_db_sqlite package graphdb import ( "testing" "github.com/btcsuite/btcd/chaincfg" "github.com/stretchr/testify/require" ) // NewTestDB is a helper function that creates a SQLStore backed by a SQL // database for testing. func NewTestDB(t testing.TB) V1Store { store, err := NewSQLStore( &SQLStoreConfig{ ChainHash: *chaincfg.MainNetParams.GenesisHash, }, newBatchQuerier(t), ) require.NoError(t, err) return store }