func (server *OpencxServer) ingestChannelFund(state *qln.StatCom, pubkey *koblitz.PublicKey, coinType uint32, qchanID uint32) (err error) {
	logging.Infof("Pubkey %x funded a channel to give me %d of cointype %d\n", pubkey.SerializeCompressed(), state.MyAmt, coinType)

	var addrMap map[*coinparam.Params]string
	if addrMap, err = server.GetAddressMap(pubkey); err != nil {
		return
	}

	logging.Infof("Registering user with pubkey %x\n", pubkey.SerializeCompressed())
	server.LockIngests()

	if err = server.OpencxDB.RegisterUser(pubkey, addrMap); err != nil {
		server.UnlockIngests()
		return
	}

	server.UnlockIngests()

	if err = server.SetupFundBack(pubkey, coinType, server.defaultCapacity); err != nil {
		return
	}

	return
}
// ingestChannelFund only registers the user because the fund channel hasn't necessarily been confirmed yet
ingestChannelFund only registers the user because the fund channel hasn't necessarily been confirmed yet
// ingestChannelFund only registers the user because the fund channel hasn ' t necessarily been confirmed yet
func (server *OpencxServer) ingestChannelFund(state *qln.StatCom, pubkey *koblitz.PublicKey, coinType uint32, qchanID uint32) (err error) {
	logging.Infof("Pubkey %x funded a channel to give me %d of cointype %d\n", pubkey.SerializeCompressed(), state.MyAmt, coinType)
	var addrMap map[*coinparam.Params]string
	if addrMap, err = server.GetAddressMap(pubkey); err != nil {
		return
	}
	logging.Infof("Registering user with pubkey %x\n", pubkey.SerializeCompressed())
	server.LockIngests()
	if err = server.OpencxDB.RegisterUser(pubkey, addrMap); err != nil {
		server.UnlockIngests()
		return
	}
	server.UnlockIngests()
	if err = server.SetupFundBack(pubkey, coinType, server.defaultCapacity); err != nil {
		return
	}
	return
}
func ( server * OpencxServer ) ingestChannelFund ( state * qln . StatCom , pubkey * koblitz . PublicKey , coinType uint32 , qchanID uint32 ) ( err error ) { logging . Infof ( " \n " , pubkey . SerializeCompressed ( ) , state . MyAmt , coinType ) var addrMap map [ * coinparam . Params ] string if addrMap , err = server . GetAddressMap ( pubkey ) ; err != nil { return } logging . Infof ( " \n " , pubkey . SerializeCompressed ( ) ) server . LockIngests ( ) if err = server . OpencxDB . RegisterUser ( pubkey , addrMap ) ; err != nil { server . UnlockIngests ( ) return } server . UnlockIngests ( ) if err = server . SetupFundBack ( pubkey , coinType , server . defaultCapacity ) ; err != nil { return } return }
ingestChannelFund only registers the user because the fund channel hasn't necessarily been confirmed yet
ingestChannelFund only registers the user because the fund channel hasn ' t necessarily been confirmed yet