Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion network/peer/ip.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func (ip *UnsignedIP) Sign(signer crypto.Signer) (*SignedIP, error) {

func (ip *UnsignedIP) bytes() []byte {
p := wrappers.Packer{
Bytes: make([]byte, wrappers.IPLen+wrappers.LongLen),
Bytes: make([]byte, ips.IPPortLen+wrappers.LongLen),
}
ips.PackIP(&p, ip.IPPort)
p.PackLong(ip.Timestamp)
Expand Down
2 changes: 1 addition & 1 deletion utils/ips/ip_port.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
)

const (
IPPortLen = 16 + wrappers.ShortLen
IPPortLen = net.IPv6len + wrappers.ShortLen
nullStr = "null"
)

Expand Down
2 changes: 0 additions & 2 deletions utils/wrappers/packing.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ const (
LongLen = 8
// BoolLen is the number of bytes per bool
BoolLen = 1
// IPLen is the number of bytes per IP
IPLen = 16 + ShortLen
)

func StringLen(str string) int {
Expand Down