fix: EncodeEndian call needs to be a length of 2

This commit is contained in:
Derrick Hammer 2024-01-24 16:33:31 -05:00
parent 84acde6c72
commit 6b9a4fb7dc
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 1 additions and 1 deletions

View File

@ -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...)