Skip to content

Commit

Permalink
reduce redundant memory allocatio - resolves btcsuite#1699
Browse files Browse the repository at this point in the history
Signed-off-by: Tomasz Ziolkowski <[email protected]>
  • Loading branch information
ziollek authored and roylee17 committed May 24, 2022
1 parent 40dab55 commit a8ad257
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion connmgr/tor.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func TorLookupIP(host, proxy string) ([]net.IP, error) {
return nil, ErrTorUnrecognizedAuthMethod
}

buf = make([]byte, 7+len(host))
buf = make([]byte, 6+len(host))
buf[0] = 5 // protocol version
buf[1] = '\xF0' // Tor Resolve
buf[2] = 0 // reserved
Expand Down

0 comments on commit a8ad257

Please sign in to comment.