func isNotInMainChainErr(err error) bool {
	_, ok := err.(errNotInMainChain)
	return ok
}
isNotInMainChainErr returns whether or not the passed error is an
errNotInMainChain error.
package blockchain
import (
	"bytes"
	"encoding/binary"
	"fmt"
	"math/big"
	"reflect"
	"sort"
	"time"
	"github.com/HcashOrg/hcashd/blockchain/internal/dbnamespace"
	"github.com/HcashOrg/hcashd/blockchain/stake"
	"github.com/HcashOrg/hcashd/chaincfg"
	"github.com/HcashOrg/hcashd/chaincfg/chainhash"
	"github.com/HcashOrg/hcashd/database"
	"github.com/HcashOrg/hcashd/wire"
	"github.com/HcashOrg/hcashutil"
)
const MempoolHeight = 0x7fffffff
var (
	thresholdBucketName = []byte("thresholdstate")
	numDeploymentsKeyName = []byte("numdeployments")
	deploymentBucketName = []byte("deploymentcache")
	deploymentStateKeyName = []byte("deploymentstate")
	byteOrder = binary.LittleEndian
)
const (
	upgradeStartedBit = 0x80000000
	currentDatabaseVersion = 2
)
type errNotInMainChain string
func (e errNotInMainChain) Error() string {
	return string(e)
}