func EmptyHash(h Hash) bool {
	return h == Hash{}
}
EmptyHash checks if given Hash is empty
package types
import (
	"bytes"
	"encoding/binary"
	"encoding/hex"
	"fmt"
	"github.com/MinterTeam/minter-go-node/hexutil"
	"github.com/tendermint/tendermint/crypto/ed25519"
	"math/big"
	"math/rand"
	"reflect"
	"strconv"
	"strings"
)
const (
	HashLength              = 32
	AddressLength           = 20
	PubKeyLength            = 32
	CoinSymbolLength        = 10
	TendermintAddressLength = 20
)
const (
	BasecoinID = 0
)
var (
	hashT    = reflect.TypeOf(Hash{})
	addressT = reflect.TypeOf(Address{})
)
type Hash [HashLength]byte
func BytesToHash(b []byte) Hash {
	var h Hash
	h.SetBytes(b)
	return h
}
func (h Hash) Str() string { return string(h[:]) }
func (h Hash) Bytes() []byte { return h[:] }
func (h Hash) Big() *big.Int { return new(big.Int).SetBytes(h[:]) }
func (h Hash) Hex() string { return hexutil.Encode(h[:]) }
func (h Hash) TerminalString() string {
	return fmt.Sprintf("%x…%x", h[:3], h[29:])
}
func (h Hash) String() string {
	return h.Hex()
}
func (h Hash) Format(s fmt.State, c rune) {
	fmt.Fprintf(s, "%"+string(c), h[:])
}
func (h *Hash) UnmarshalText(input []byte) error {
	return hexutil.UnmarshalFixedText("Hash", input, h[:])
}
func (h *Hash) UnmarshalJSON(input []byte) error {
	return hexutil.UnmarshalFixedJSON(hashT, input, h[:])
}
func (h Hash) MarshalText() ([]byte, error) {
	return hexutil.Bytes(h[:]).MarshalText()
}
func (h *Hash) SetBytes(b []byte) {
	if len(b) > len(h) {
		b = b[len(b)-HashLength:]
	}
	copy(h[HashLength-len(b):], b)
}
func (h *Hash) SetString(s string) { h.SetBytes([]byte(s)) }
func (h *Hash) Set(other Hash) {
	for i, v := range other {
		h[i] = v
	}
}
func (h Hash) Generate(rand *rand.Rand, size int) reflect.Value {
	m := rand.Intn(len(h))
	for i := len(h) - 1; i > m; i-- {
		h[i] = byte(rand.Uint32())
	}
	return reflect.ValueOf(h)
}