示例#1
0
		LS.append(JSONRPCListener(server, a))
	if hasattr(config, 'SecretUser'):
		server.SecretUser = config.SecretUser
	server.aux = MM.CoinbaseAux
	server.getBlockHeader = getBlockHeader
	server.getBlockTemplate = getBlockTemplate
	server.receiveShare = receiveShare
	server.RaiseRedFlags = RaiseRedFlags
	server.ShareTarget = config.ShareTarget
	server.checkAuthentication = checkAuthentication
	
	if hasattr(config, 'TrustedForwarders'):
		server.TrustedForwarders = config.TrustedForwarders
	server.ServerName = config.ServerName
	
	stratumsrv = StratumServer()
	stratumsrv.getStratumJob = getStratumJob
	stratumsrv.getExistingStratumJob = getExistingStratumJob
	stratumsrv.receiveShare = receiveShare
	stratumsrv.getTarget = getTarget
	stratumsrv.defaultTarget = config.ShareTarget
	stratumsrv.IsJobValid = IsJobValid
	stratumsrv.checkAuthentication = checkAuthentication
	if not hasattr(config, 'StratumAddresses'):
		config.StratumAddresses = ()
	for a in config.StratumAddresses:
		NetworkListener(stratumsrv, a)
	
	MM.start()
	
	restoreState(config.SaveStateFilename)
示例#2
0
	for a in config.JSONRPCAddresses:
		LS.append(JSONRPCListener(server, a))
	if hasattr(config, 'SecretUser'):
		server.SecretUser = config.SecretUser
	server.aux = MM.CoinbaseAux
	server.getBlockHeader = getBlockHeader
	server.getBlockTemplate = getBlockTemplate
	server.receiveShare = receiveShare
	server.RaiseRedFlags = RaiseRedFlags
	server.ShareTarget = config.ShareTarget
	
	if hasattr(config, 'TrustedForwarders'):
		server.TrustedForwarders = config.TrustedForwarders
	server.ServerName = config.ServerName
	
	stratumsrv = StratumServer()
	stratumsrv.getStratumJob = getStratumJob
	stratumsrv.getExistingStratumJob = getExistingStratumJob
	stratumsrv.receiveShare = receiveShare
	stratumsrv.getTarget = getTarget
	stratumsrv.checkAuthentication = checkAuthentication
	stratumsrv.defaultTarget = config.ShareTarget
    stratumsrv.IsJobValid = IsJobValid
	if not hasattr(config, 'StratumAddresses'):
		config.StratumAddresses = ()
	for a in config.StratumAddresses:
		NetworkListener(stratumsrv, a)
	
	MM.start()
	
	restoreState()
示例#3
0
	if hasattr(config, 'SecretUser'):
		server.SecretUser = config.SecretUser
	server.aux = MM.CoinbaseAux
	server.getBlockHeader = getBlockHeader
	server.getBlockTemplate = getBlockTemplate
	server.receiveShare = receiveShare
	server.RaiseRedFlags = RaiseRedFlags
	server.ShareTarget = config.ShareTarget
	server.StaleWorkTimeout = config.StaleWorkTimeout
	server.checkAuthentication = checkAuthentication
	
	if hasattr(config, 'TrustedForwarders'):
		server.TrustedForwarders = config.TrustedForwarders
	server.ServerName = config.ServerName
	
	stratumsrv = StratumServer()
	stratumsrv.getStratumJob = getStratumJob
	stratumsrv.getExistingStratumJob = getExistingStratumJob
	stratumsrv.receiveShare = receiveShare
	stratumsrv.RaiseRedFlags = RaiseRedFlags
	stratumsrv.getTarget = getTarget
	stratumsrv.defaultTarget = config.ShareTarget
	stratumsrv.IsJobValid = IsJobValid
	stratumsrv.checkAuthentication = checkAuthentication
	stratumsrv.WorkUpdateInterval = config.WorkUpdateInterval
	if not hasattr(config, 'StratumAddresses'):
		config.StratumAddresses = ()
	for a in config.StratumAddresses:
		NetworkListener(stratumsrv, a)
	
	MM.start()
示例#4
0
	for a in config.JSONRPCAddresses:
		LS.append(JSONRPCListener(server, a))
	if hasattr(config, 'SecretUser'):
		server.SecretUser = config.SecretUser
	server.aux = MM.CoinbaseAux
	server.getBlockHeader = getBlockHeader
	server.getBlockTemplate = getBlockTemplate
	server.receiveShare = receiveShare
	server.RaiseRedFlags = RaiseRedFlags
	server.ShareTarget = config.ShareTarget
	
	if hasattr(config, 'TrustedForwarders'):
		server.TrustedForwarders = config.TrustedForwarders
	server.ServerName = config.ServerName
	
	stratumsrv = StratumServer()
	stratumsrv.getStratumJob = getStratumJob
	stratumsrv.getExistingStratumJob = getExistingStratumJob
	stratumsrv.receiveShare = receiveShare
	stratumsrv.getTarget = getTarget
	stratumsrv.defaultTarget = config.ShareTarget
	stratumsrv.IsJobValid = IsJobValid
	if not hasattr(config, 'StratumAddresses'):
		config.StratumAddresses = ()
	for a in config.StratumAddresses:
		NetworkListener(stratumsrv, a)
	
	MM.start()
	
	restoreState()
	
示例#5
0
	if hasattr(config, 'SecretUser'):
		server.SecretUser = config.SecretUser
	server.aux = MM.CoinbaseAux
	server.getBlockHeader = getBlockHeader
	server.getBlockTemplate = getBlockTemplate
	server.receiveShare = receiveShare
	server.RaiseRedFlags = RaiseRedFlags
	server.BlockVersion = config.BlockVersion
	server.ShareTarget = config.ShareTarget
	server.checkAuthentication = checkAuthentication
	
	if hasattr(config, 'TrustedForwarders'):
		server.TrustedForwarders = config.TrustedForwarders
	server.ServerName = config.ServerName
	
	stratumsrv = StratumServer()
	stratumsrv.getStratumJob = getStratumJob
	stratumsrv.getExistingStratumJob = getExistingStratumJob
	stratumsrv.receiveShare = receiveShare
	stratumsrv.RaiseRedFlags = RaiseRedFlags
	stratumsrv.getTarget = getTarget
	stratumsrv.BlockVersionHex = '%08x' % (config.BlockVersion,)
	stratumsrv.defaultTarget = config.ShareTarget
	stratumsrv.IsJobValid = IsJobValid
	stratumsrv.checkAuthentication = checkAuthentication
	if not hasattr(config, 'StratumAddresses'):
		config.StratumAddresses = ()
	for a in config.StratumAddresses:
		NetworkListener(stratumsrv, a)
	
	MM.start()
示例#6
0
    if hasattr(config, 'SecretUser'):
        server.SecretUser = config.SecretUser
    server.aux = MM.CoinbaseAux
    server.getBlockHeader = getBlockHeader
    server.getBlockTemplate = getBlockTemplate
    server.receiveShare = receiveShare
    server.RaiseRedFlags = RaiseRedFlags
    server.ShareTarget = config.ShareTarget
    server.StaleWorkTimeout = config.StaleWorkTimeout
    server.checkAuthentication = checkAuthentication

    if hasattr(config, 'TrustedForwarders'):
        server.TrustedForwarders = config.TrustedForwarders
    server.ServerName = config.ServerName

    stratumsrv = StratumServer()
    stratumsrv.getStratumJob = getStratumJob
    stratumsrv.getExistingStratumJob = getExistingStratumJob
    stratumsrv.receiveShare = receiveShare
    stratumsrv.RaiseRedFlags = RaiseRedFlags
    stratumsrv.getTarget = getTarget
    stratumsrv.defaultTarget = config.ShareTarget
    stratumsrv.IsJobValid = IsJobValid
    stratumsrv.checkAuthentication = checkAuthentication
    stratumsrv.WorkUpdateInterval = config.WorkUpdateInterval
    if not hasattr(config, 'StratumAddresses'):
        config.StratumAddresses = ()
    for a in config.StratumAddresses:
        NetworkListener(stratumsrv, a)

    MM.start()
示例#7
0
    if hasattr(config, 'SecretUser'):
        server.SecretUser = config.SecretUser
    server.aux = MM.CoinbaseAux
    server.getBlockHeader = getBlockHeader
    server.getBlockTemplate = getBlockTemplate
    server.receiveShare = receiveShare
    server.RaiseRedFlags = RaiseRedFlags
    server.ShareTarget = config.ShareTarget
    server.StaleWorkTimeout = config.StaleWorkTimeout
    server.checkAuthentication = checkAuthentication

    if hasattr(config, 'TrustedForwarders'):
        server.TrustedForwarders = config.TrustedForwarders
    server.ServerName = config.ServerName

    stratumsrv = StratumServer()
    stratumsrv.getStratumJob = getStratumJob
    stratumsrv.setLogGbtCall = setLogGbtCall
    stratumsrv.getLogGbtCall = getLogGbtCall
    stratumsrv.getExistingStratumJob = getExistingStratumJob
    stratumsrv.receiveShare = receiveShare
    stratumsrv.RaiseRedFlags = RaiseRedFlags
    stratumsrv.getTarget = getTarget

    if hasattr(config, 'DEV_MODE_ON') and config.DEV_MODE_ON:
        stratumsrv.defaultTarget = bdiff2target(config.MINER_DIFF)
    else:
        stratumsrv.defaultTarget = config.ShareTarget
    stratumsrv.IsJobValid = IsJobValid
    stratumsrv.checkAuthentication = checkAuthentication
    stratumsrv.WorkUpdateInterval = config.WorkUpdateInterval
示例#8
0
    if hasattr(config, 'SecretUser'):
        server.SecretUser = config.SecretUser
    server.aux = MM.CoinbaseAux
    server.getBlockHeader = getBlockHeader
    server.getBlockTemplate = getBlockTemplate
    server.receiveShare = receiveShare
    server.RaiseRedFlags = RaiseRedFlags
    server.BlockVersion = config.BlockVersion
    server.ShareTarget = config.ShareTarget
    server.checkAuthentication = checkAuthentication

    if hasattr(config, 'TrustedForwarders'):
        server.TrustedForwarders = config.TrustedForwarders
    server.ServerName = config.ServerName

    stratumsrv = StratumServer()
    stratumsrv.getStratumJob = getStratumJob
    stratumsrv.getExistingStratumJob = getExistingStratumJob
    stratumsrv.receiveShare = receiveShare
    stratumsrv.RaiseRedFlags = RaiseRedFlags
    stratumsrv.getTarget = getTarget
    stratumsrv.BlockVersionHex = '%08x' % (config.BlockVersion, )
    stratumsrv.defaultTarget = config.ShareTarget
    stratumsrv.IsJobValid = IsJobValid
    stratumsrv.checkAuthentication = checkAuthentication
    if not hasattr(config, 'StratumAddresses'):
        config.StratumAddresses = ()
    for a in config.StratumAddresses:
        NetworkListener(stratumsrv, a)

    MM.start()