func InitServer(db cxdb.OpencxStore, homedir string, rpcport uint16, coinList []*coinparam.Params) (server *OpencxServer) {
	server = &OpencxServer{
		OpencxDB:           db,
		OpencxPort:         rpcport,
		OpencxRoot:         homedir,
		registrationString: "opencx-register",
		getOrdersString:    "opencx-getorders",
		ingestMutex:        *new(sync.Mutex),
		BlockChanMap:       make(map[int]chan *wire.MsgBlock),
		HeightEventChanMap: make(map[int]chan lnutil.HeightEvent),

		HookMap:    make(map[*coinparam.Params]*uspv.ChainHook),
		WalletMap:  make(map[*coinparam.Params]*wallit.Wallit),
		PrivKeyMap: make(map[*coinparam.Params]*hdkeychain.ExtendedKey),

		hookMtx:    new(sync.Mutex),
		walletMtx:  new(sync.Mutex),
		privKeyMtx: new(sync.Mutex),

		CoinList:        coinList,
		defaultCapacity: 1000000,
	}

	return
}
// InitServer creates a new server
InitServer creates a new server
// InitServer creates a new server
func InitServer(db cxdb.OpencxStore, homedir string, rpcport uint16, coinList []*coinparam.Params) (server *OpencxServer) {
	server = &OpencxServer{
		OpencxDB:           db,
		OpencxPort:         rpcport,
		OpencxRoot:         homedir,
		registrationString: "opencx-register",
		getOrdersString:    "opencx-getorders",
		ingestMutex:        *new(sync.Mutex),
		BlockChanMap:       make(map[int]chan *wire.MsgBlock),
		HeightEventChanMap: make(map[int]chan lnutil.HeightEvent),
		HookMap:    make(map[*coinparam.Params]*uspv.ChainHook),
		WalletMap:  make(map[*coinparam.Params]*wallit.Wallit),
		PrivKeyMap: make(map[*coinparam.Params]*hdkeychain.ExtendedKey),
		hookMtx:    new(sync.Mutex),
		walletMtx:  new(sync.Mutex),
		privKeyMtx: new(sync.Mutex),
		CoinList:        coinList,
		defaultCapacity: 1000000,
	}
	return
}
func InitServer ( db cxdb . OpencxStore , homedir string , rpcport uint16 , coinList [ ] * coinparam . Params ) ( server * OpencxServer ) { server = & OpencxServer { OpencxDB : db , OpencxPort : rpcport , OpencxRoot : homedir , registrationString : " " , getOrdersString : " " , ingestMutex : * new ( sync . Mutex ) , BlockChanMap : make ( map [ int ] chan * wire . MsgBlock ) , HeightEventChanMap : make ( map [ int ] chan lnutil . HeightEvent ) , HookMap : make ( map [ * coinparam . Params ] * uspv . ChainHook ) , WalletMap : make ( map [ * coinparam . Params ] * wallit . Wallit ) , PrivKeyMap : make ( map [ * coinparam . Params ] * hdkeychain . ExtendedKey ) , hookMtx : new ( sync . Mutex ) , walletMtx : new ( sync . Mutex ) , privKeyMtx : new ( sync . Mutex ) , CoinList : coinList , defaultCapacity : 1000000 , } return }
InitServer creates a new server
InitServer creates a new server