github.com/gnolang/gno@v0.0.0-20240520182011-228e9d0192ce/tm2/pkg/bft/types/fingerprint.go (about)

     1  package types
     2  
     3  // fingerprint returns the first 6 bytes of a byte slice.
     4  // If the slice is less than 6 bytes, the fingerprint
     5  // contains trailing zeroes.
     6  func fingerprint(slice []byte) []byte {
     7  	fingerprint := make([]byte, 6)
     8  	copy(fingerprint, slice)
     9  	return fingerprint
    10  }