fix: EncodeEndian call needs to be a length of 2
This commit is contained in:
parent
84acde6c72
commit
6b9a4fb7dc
|
@ -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...)
|
||||
|
|
Loading…
Reference in New Issue