From ea08b5f08d84d2ff1ddfa2027660ff58a60219c3 Mon Sep 17 00:00:00 2001 From: HenryNguyen5 <6404866+HenryNguyen5@users.noreply.github.com> Date: Tue, 30 Apr 2024 21:05:34 -0400 Subject: [PATCH] Fix some txdb comment typos (#13059) --- .changeset/spotty-cooks-think.md | 5 +++++ core/internal/testutils/pgtest/txdb.go | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 .changeset/spotty-cooks-think.md diff --git a/.changeset/spotty-cooks-think.md b/.changeset/spotty-cooks-think.md new file mode 100644 index 00000000000..e645de27beb --- /dev/null +++ b/.changeset/spotty-cooks-think.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +#internal fix txdb documentation typos diff --git a/core/internal/testutils/pgtest/txdb.go b/core/internal/testutils/pgtest/txdb.go index da9fd6cb2d0..f4640946ad4 100644 --- a/core/internal/testutils/pgtest/txdb.go +++ b/core/internal/testutils/pgtest/txdb.go @@ -74,8 +74,8 @@ var _ driver.Conn = &conn{} var _ driver.Validator = &conn{} var _ driver.SessionResetter = &conn{} -// txDriver is an sql driver which runs on single transaction -// when the Close is called, transaction is rolled back +// txDriver is an sql driver which runs on a single transaction. +// When `Close` is called, transaction is rolled back. type txDriver struct { sync.Mutex db *sql.DB @@ -110,8 +110,8 @@ func (d *txDriver) Open(dsn string) (driver.Conn, error) { return c, nil } -// deleteConn is called by connection when it is closed -// It also auto-closes the DB when the last checked out connection is closed +// deleteConn is called by a connection when it is closed via the `close` method. +// It also auto-closes the DB when the last checked out connection is closed. func (d *txDriver) deleteConn(c *conn) error { // must lock here to avoid racing with Open d.Lock()