Revert "reduce redundant memory allocatio - resolves btcsuite/btcd#1699"

This reverts commit 780cc0889f.
This commit is contained in:
eugene 2022-02-04 15:33:12 -05:00
parent 81fbd9b67e
commit 342f4f8845
No known key found for this signature in database
GPG Key ID: 118759E83439A9B1

View File

@ -76,7 +76,7 @@ func TorLookupIP(host, proxy string) ([]net.IP, error) {
return nil, ErrTorUnrecognizedAuthMethod return nil, ErrTorUnrecognizedAuthMethod
} }
buf = make([]byte, 6+len(host)) buf = make([]byte, 7+len(host))
buf[0] = 5 // protocol version buf[0] = 5 // protocol version
buf[1] = '\xF0' // Tor Resolve buf[1] = '\xF0' // Tor Resolve
buf[2] = 0 // reserved buf[2] = 0 // reserved