keys: fix PublicKeys decoding

It changes the slice, thus it has to work via a pointer.
This commit is contained in:
Roman Khimov 2020-02-12 14:55:19 +03:00
parent 803fb39bb0
commit 141553da4c

View file

@ -36,7 +36,7 @@ func (keys PublicKeys) Less(i, j int) bool {
} }
// DecodeBytes decodes a PublicKeys from the given slice of bytes. // DecodeBytes decodes a PublicKeys from the given slice of bytes.
func (keys PublicKeys) DecodeBytes(data []byte) error { func (keys *PublicKeys) DecodeBytes(data []byte) error {
b := io.NewBinReaderFromBuf(data) b := io.NewBinReaderFromBuf(data)
b.ReadArray(keys) b.ReadArray(keys)
return b.Err return b.Err