From 3212a237414d037625808815a61ad51423e7ea65 Mon Sep 17 00:00:00 2001 From: "Andrew Jackson (Ajax)" Date: Tue, 11 Jul 2023 21:50:03 -0500 Subject: [PATCH] renames --- itests/clusterdb_test.go | 3 --- lib/sturdy/clusterdb/clusterdb.go | 4 ++-- lib/sturdy/clusterdb/userfuncs.go | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/itests/clusterdb_test.go b/itests/clusterdb_test.go index e84491211..e1b29f691 100644 --- a/itests/clusterdb_test.go +++ b/itests/clusterdb_test.go @@ -28,9 +28,6 @@ func withSetup(t *testing.T, f func(*kit.TestMiner)) { kit.LatestActorsAt(-1), kit.MockProofs(), kit.ConstructorOpts( - node.Override(new(config.ClusterDB), func() config.ClusterDB { - return staticConfig() - }), node.Override(new(*clusterdb.DB), clusterdb.NewFromConfig), //Why does this not work? ), ) diff --git a/lib/sturdy/clusterdb/clusterdb.go b/lib/sturdy/clusterdb/clusterdb.go index 4c323c78e..7b77b6365 100644 --- a/lib/sturdy/clusterdb/clusterdb.go +++ b/lib/sturdy/clusterdb/clusterdb.go @@ -35,12 +35,12 @@ type DB struct { log func(string) } -var logger = logging.Logger("sturdydb") +var logger = logging.Logger("clusterdb") // NewFromConfig is a convenience function. // In usage: // -// db, err := NewFromConfig(config.SturdyDB) // in binary init +// db, err := NewFromConfig(config.ClusterDB) // in binary init func NewFromConfig(cfg config.ClusterDB) (*DB, error) { return New( cfg.Hosts, diff --git a/lib/sturdy/clusterdb/userfuncs.go b/lib/sturdy/clusterdb/userfuncs.go index e9cd84bd0..98ceddb08 100644 --- a/lib/sturdy/clusterdb/userfuncs.go +++ b/lib/sturdy/clusterdb/userfuncs.go @@ -19,7 +19,7 @@ type Intf interface { // rawStringOnly is _intentionally_private_ to force only basic strings in SQL queries. // In any package, raw strings will satisfy compilation. Ex: // -// sturdydb.Exec("INSERT INTO version (number) VALUES (1)") +// clusterDB.Exec("INSERT INTO version (number) VALUES (1)") // // This prevents SQL injection attacks where the input contains query fragments. type rawStringOnly string