Skip to content

Commit

Permalink
Fix some txdb comment typos (#13059)
Browse files Browse the repository at this point in the history
  • Loading branch information
HenryNguyen5 authored May 1, 2024
1 parent 55545bb commit ea08b5f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/spotty-cooks-think.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

#internal fix txdb documentation typos
8 changes: 4 additions & 4 deletions core/internal/testutils/pgtest/txdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit ea08b5f

Please sign in to comment.