diff --git a/service/p2p.go b/service/p2p.go index 7ead845..0c9cfd1 100644 --- a/service/p2p.go +++ b/service/p2p.go @@ -685,7 +685,7 @@ func (p *P2PImpl) PrepareProvideMessage(hash *encoding.Multihash, location inter bytes := []byte(part) // Encode the length of the part as 4 bytes and append. - list = append(list, utils.EncodeEndian(uint64(len(bytes)), 4)...) + list = append(list, utils.EncodeEndian(uint64(len(bytes)), 2)...) // Append the actual part bytes. list = append(list, bytes...)