func (hash *Hash) CloneBytes32() [HashSize]byte {
	var b [HashSize]byte
	copy(b[:], hash[:])
	return b
}
CloneBytes32 returns a copy of bytes representing the hash, as [HashSize]byte slice.

This is used when creating version messages, for the GenesisHash field. [HashSize]byte
instead of chainhash.Hash is used in version messages to avoid a circular import
dependency between wire and chaincfg packages.
package chainhash
import (
	"encoding/hex"
	"fmt"
)
const HashSize = 32
const MaxHashStringSize = HashSize * 2
var ErrHashStrSize = fmt.Errorf("max hash string length is %v bytes", MaxHashStringSize)
type Hash [HashSize]byte
func (hash Hash) String() string {
	for i := 0; i < HashSize/2; i++ {
		hash[i], hash[HashSize-1-i] = hash[HashSize-1-i], hash[i]
	}
	return hex.EncodeToString(hash[:])
}
func (hash *Hash) CloneBytes() []byte {
	newHash := make([]byte, HashSize)
	copy(newHash, hash[:])
	return newHash
}