func HashToBig(hash *chainhash.Hash) *big.Int {
	buf := *hash
	blen := len(buf)
	for i := 0; i < blen/2; i++ {
		buf[i], buf[blen-1-i] = buf[blen-1-i], buf[i]
	}
	return new(big.Int).SetBytes(buf[:])
}
HashToBig converts a chainhash.Hash into a big.Int that can be used to
perform math comparisons.
package blockchain
import (
	"fmt"
	"math/big"
	"time"
	"github.com/HcashOrg/hcashd/chaincfg"
	"github.com/HcashOrg/hcashd/chaincfg/chainhash"
	"github.com/HcashOrg/hcashd/wire"
)
var (
	bigZero = big.NewInt(0)
	bigOne = big.NewInt(1)
	oneLsh256 = new(big.Int).Lsh(bigOne, 256)
)
const maxShift = uint(256)