diff options
Diffstat (limited to 'types/trunnel.go')
-rw-r--r-- | types/trunnel.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/types/trunnel.go b/types/trunnel.go index 72ae68d..268f6f7 100644 --- a/types/trunnel.go +++ b/types/trunnel.go @@ -46,12 +46,15 @@ func (l *Leaf) Unmarshal(buf []byte) error { l.ShardHint = binary.BigEndian.Uint64(buf) offset := 8 // Checksum + l.Checksum = &[HashSize]byte{} copy(l.Checksum[:], buf[offset:offset+HashSize]) offset += HashSize // Signature + l.Signature = &[SignatureSize]byte{} copy(l.Signature[:], buf[offset:offset+SignatureSize]) offset += SignatureSize // KeyHash + l.KeyHash = &[HashSize]byte{} copy(l.KeyHash[:], buf[offset:]) return nil } |