sys.stderr.write('Programming error: A structure with the wrong number of values was passed into the addressGeneratorQueue. Here is the queueValue: %s\n'%queueValue)
ifaddressVersionNumber<3oraddressVersionNumber>3:
sys.stderr.write('Program error: For some reason the address generator queue has been given a request to create version',addressVersionNumber,' addresses which it cannot do.\n')
ifaddressVersionNumber==3:
sys.stderr.write('Program error: For some reason the address generator queue has been given a request to create at least one version %s address which it cannot do.\n'%addressVersionNumber)
shared.UISignalQueue.put(('updateStatusBar','Generating one new address'))
#This next section is a little bit strange. We're going to generate keys over and over until we
#find one that starts with either \x00 or \x00\x00. Then when we pack them into a Bitmessage address,
@ -3237,7 +3251,6 @@ class addressGenerator(threading.Thread):
print'Generated address with ripe digest:',ripe.digest().encode('hex')
print'Address generator calculated',numberOfAddressesWeHadToMakeBeforeWeFoundOneWithTheCorrectRipePrefix,'addresses at',numberOfAddressesWeHadToMakeBeforeWeFoundOneWithTheCorrectRipePrefix/(time.time()-startTime),'addresses per second before finding one with the correct ripe-prefix.'
return'API Error 0001: The specified passphrase is blank.'
passphrase=passphrase.decode('base64')
@ -3513,8 +3558,7 @@ class MySimpleXMLRPCRequestHandler(SimpleXMLRPCRequestHandler):
return'API Error 0005: You have (accidentally?) specified too many addresses to make. Maximum 999. This check only exists to prevent mischief; if you really want to create more addresses than this, contact the Bitmessage developers and we can modify the check or you can do it yourself by searching the source code for this message.'
apiAddressGeneratorReturnQueue.queue.clear()
print'Requesting that the addressGenerator create',numberOfAddresses,'addresses.'
shared.addressGeneratorQueue.put((addressVersionNumber,streamNumber,'unused API address',numberOfAddresses,passphrase,eighteenByteRipe))
shared.addressGeneratorQueue.put((addressVersionNumber,streamNumber,'unused API address',numberOfAddresses,passphrase,eighteenByteRipe,nonceTrialsPerByte,payloadLengthExtraBytes))
data='{"addresses":['
queueReturn=apiAddressGeneratorReturnQueue.get()
foriteminqueueReturn:
@ -3548,7 +3592,6 @@ class MySimpleXMLRPCRequestHandler(SimpleXMLRPCRequestHandler):
shared.sqlReturnQueue.get()
shared.sqlSubmitQueue.put('commit')
shared.sqlLock.release()
#apiSignalQueue.put(('updateStatusBar','Per API: Trashed message (assuming message existed). UI not updated.'))
shared.UISignalQueue.put(('updateStatusBar','Per API: Trashed message (assuming message existed). UI not updated.'))
return'Trashed message (assuming message existed). UI not updated. To double check, run getAllInboxMessages to see that the message disappeared, or restart Bitmessage and look in the normal Bitmessage GUI.'