func NewExistsAddrIndex(db database.DB, chainParams *chaincfg.Params) *ExistsAddrIndex {
	return &ExistsAddrIndex{
		db:           db,
		chainParams:  chainParams,
		mpExistsAddr: make(map[[addrKeySize]byte]struct{}),
	}
}
NewExistsAddrIndex returns a new instance of an indexer that is used to
create a mapping of all addresses ever seen.

It implements the Indexer interface which plugs into the IndexManager that in
turn is used by the blockchain package.  This allows the index to be
seamlessly maintained along with the chain.
package indexers
import (
	"sync"
	"github.com/HcashOrg/hcashd/blockchain"
	"github.com/HcashOrg/hcashd/blockchain/stake"
	"github.com/HcashOrg/hcashd/chaincfg"
	"github.com/HcashOrg/hcashd/database"
	"github.com/HcashOrg/hcashd/txscript"
	"github.com/HcashOrg/hcashd/wire"
	"github.com/HcashOrg/hcashutil"
)
var (
	existsAddressIndexName = "exists address index"
	existsAddrIndexKey = []byte("existsaddridx")
)
type ExistsAddrIndex struct {
	db          database.DB
	chainParams *chaincfg.Params
	unconfirmedLock sync.RWMutex
	mpExistsAddr    map[[addrKeySize]byte]struct{}
}