|
|
|
@ -14,16 +14,6 @@ import signal # Used to capture a Ctrl-C keypress so that Bitmessage can shutdo
|
|
|
|
|
import singleton
|
|
|
|
|
import os
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# OSX python version check
|
|
|
|
|
import sys
|
|
|
|
|
if sys.platform == 'darwin':
|
|
|
|
|
if float("{1}.{2}".format(*sys.version_info)) < 7.5:
|
|
|
|
|
msg = "You should use python 2.7.5 or greater. Your version: %s", "{0}.{1}.{2}".format(*sys.version_info)
|
|
|
|
|
logger.critical(msg)
|
|
|
|
|
print msg
|
|
|
|
|
sys.exit(0)
|
|
|
|
|
|
|
|
|
|
from SimpleXMLRPCServer import SimpleXMLRPCServer
|
|
|
|
|
from bitmessageapi import MySimpleXMLRPCRequestHandler
|
|
|
|
|
|
|
|
|
@ -31,7 +21,6 @@ import shared
|
|
|
|
|
from helper_sql import sqlQuery
|
|
|
|
|
import threading
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Classes
|
|
|
|
|
#from helper_sql import *
|
|
|
|
|
#from class_sqlThread import *
|
|
|
|
@ -49,11 +38,19 @@ from debug import logger
|
|
|
|
|
# Helper Functions
|
|
|
|
|
import helper_bootstrap
|
|
|
|
|
import helper_generic
|
|
|
|
|
#import proofofwork
|
|
|
|
|
|
|
|
|
|
from subprocess import call
|
|
|
|
|
import time
|
|
|
|
|
|
|
|
|
|
# OSX python version check
|
|
|
|
|
import sys
|
|
|
|
|
if sys.platform == 'darwin':
|
|
|
|
|
if float("{1}.{2}".format(*sys.version_info)) < 7.5:
|
|
|
|
|
msg = "You should use python 2.7.5 or greater. Your version: %s", "{0}.{1}.{2}".format(*sys.version_info)
|
|
|
|
|
logger.critical(msg)
|
|
|
|
|
print msg
|
|
|
|
|
sys.exit(0)
|
|
|
|
|
|
|
|
|
|
def connectToStream(streamNumber):
|
|
|
|
|
shared.streamsInWhichIAmParticipating[streamNumber] = 'no data'
|
|
|
|
|
selfInitiatedConnections[streamNumber] = {}
|
|
|
|
@ -87,7 +84,6 @@ class singleAPI(threading.Thread):
|
|
|
|
|
# This is a list of current connections (the thread pointers at least)
|
|
|
|
|
selfInitiatedConnections = {}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if shared.useVeryEasyProofOfWorkForTesting:
|
|
|
|
|
shared.networkDefaultProofOfWorkNonceTrialsPerByte = int(
|
|
|
|
|
shared.networkDefaultProofOfWorkNonceTrialsPerByte / 16)
|
|
|
|
|