func (bc *blockchain) hash(b *block) string {
	blkString, err := json.Marshal(b)
	if err != nil {
		log.Println("Error marshalling block: ", err)
	}
	hsh := sha256.Sum256(blkString)
	return fmt.Sprintf("%x", hsh)
}
// hash creates a SHA-256 a block
hash creates a SHA-256 a block
// hash creates a SHA - 256 a block
func (bc *blockchain) hash(b *block) string {
	blkString, err := json.Marshal(b)
	if err != nil {
		log.Println("Error marshalling block: ", err)
	}
	hsh := sha256.Sum256(blkString)
	return fmt.Sprintf("%x", hsh)
}
func ( bc * blockchain ) hash ( b * block ) string { blkString , err := json . Marshal ( b ) if err != nil { log . Println ( " " , err ) } hsh := sha256 . Sum256 ( blkString ) return fmt . Sprintf ( " " , hsh ) }
hash creates a SHA-256 a block
hash creates a SHA - 256 a block