dc420da802
magneticod: !!! disabled the gradual increase in congestion control, for some reason we still can't detect congestion... - `*net.UDPAddr` in dht/mainline instead of `net.Addr` - fixed a bug when a very small extension message received - simplified how peer adress is handled in bittorrent/metadata/sink - simplified TrawlingResult in dht/mainline magneticow: - use WAL for sqlite3 persistence: - use URL.String() instead of url.Path in sql.Open() so that URL parameters are not lost...
11 lines
216 B
Go
11 lines
216 B
Go
package util
|
|
|
|
import (
|
|
"encoding/hex"
|
|
|
|
"go.uber.org/zap/zapcore"
|
|
)
|
|
|
|
func HexField(key string, val []byte) zapcore.Field {
|
|
return zapcore.Field{Key: key, Type: zapcore.StringType, String: hex.EncodeToString(val)}
|
|
} |