Skip to content

Commit

Permalink
nit: relayer - private close method
Browse files Browse the repository at this point in the history
  • Loading branch information
tuxcanfly committed Feb 28, 2023
1 parent 8230fe6 commit 437b653
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion read.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ func Read(hash *chainhash.Hash) ([]byte, error) {
if err != nil {
return nil, err
}
defer relayer.Close()
defer relayer.close()
tx, err := relayer.client.GetRawTransaction(hash)
if err != nil {
return nil, err
Expand Down
4 changes: 2 additions & 2 deletions relayer.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ type relayer struct {
client *rpcclient.Client
}

// Close shuts down the client.
func (r relayer) Close() {
// close shuts down the client.
func (r relayer) close() {
r.client.Shutdown()
}

Expand Down
2 changes: 1 addition & 1 deletion write.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func Write(data []byte) (*chainhash.Hash, error) {
if err != nil {
return nil, err
}
defer relayer.Close()
defer relayer.close()
hash, err := relayer.commitTx(address)
if err != nil {
return nil, err
Expand Down

0 comments on commit 437b653

Please sign in to comment.