mirror of
https://github.com/go-i2p/go-i2p.git
synced 2025-07-18 18:44:30 -04:00
Corrected Bytes()
-TODO: add logging
This commit is contained in:
@@ -154,14 +154,7 @@ func (router_address RouterAddress) Bytes() []byte {
|
||||
bytes := make([]byte, 0)
|
||||
bytes = append(bytes, router_address.TransportCost.Bytes()...)
|
||||
bytes = append(bytes, router_address.ExpirationDate.Bytes()...)
|
||||
strData, err := router_address.TransportType.Data()
|
||||
if err != nil {
|
||||
log.WithFields(logrus.Fields{
|
||||
"error": err,
|
||||
}).Error("RouterAddress.Bytes: error getting transport_style bytes")
|
||||
} else {
|
||||
bytes = append(bytes, strData...)
|
||||
}
|
||||
bytes = append(bytes, router_address.TransportType...)
|
||||
bytes = append(bytes, router_address.TransportOptions.Data()...)
|
||||
log.WithField("bytes_length", len(bytes)).Debug("Converted RouterAddress to bytes")
|
||||
return bytes
|
||||
|
Reference in New Issue
Block a user