func (t *Tree) Pieces() []byte {
	if len(t.Nodes) == 0 {
		return nil
	}
	pieces := []byte{}
	for _, n := range t.Nodes {
		if n.checksum == nil || len(n.checksum) == 0 {
			continue
		}
		pieces = append(pieces, n.checksum...)
	}
	return pieces
}
// Pieces returns the concatenation of hash values of all blocks
//
// TODO integrate with hash size
Pieces returns the concatenation of hash values of all blocks


// Pieces returns the concatenation of hash values of all blocks // // TODO integrate with hash size
func (t *Tree) Pieces() []byte {
	if len(t.Nodes) == 0 {
		return nil
	}
	pieces := []byte{}
	for _, n := range t.Nodes {
		if n.checksum == nil || len(n.checksum) == 0 {
			continue
		}
		pieces = append(pieces, n.checksum...)
	}
	return pieces
}
func ( t * Tree ) Pieces ( ) [ ] byte { if len ( t . Nodes ) == 0 { return nil } pieces := [ ] byte { } for _ , n := range t . Nodes { if n . checksum == nil || len ( n . checksum ) == 0 { continue } pieces = append ( pieces , n . checksum ... ) } return pieces }
Pieces returns the concatenation of hash values of all blocks
Pieces returns the concatenation of hash values of all blocks