- networkDefaultProofOfWorkNonceTrialsPerByte and
networkDefaultPayloadLengthExtraBytes cyclic import fix
- PyBitmessage should launch now when there's no keys.dat
print'(For msg message via API) Doing proof of work. Total required difficulty:',float(requiredAverageProofOfWorkNonceTrialsPerByte)/protocol.networkDefaultProofOfWorkNonceTrialsPerByte,'Required small message difficulty:',float(requiredPayloadLengthExtraBytes)/protocol.networkDefaultPayloadLengthExtraBytes
print'(For msg message via API) Doing proof of work. Total required difficulty:',float(requiredAverageProofOfWorkNonceTrialsPerByte)/defaults.networkDefaultProofOfWorkNonceTrialsPerByte,'Required small message difficulty:',float(requiredPayloadLengthExtraBytes)/defaults.networkDefaultPayloadLengthExtraBytes
ifrequiredAverageProofOfWorkNonceTrialsPerByte<protocol.networkDefaultProofOfWorkNonceTrialsPerByte:# We still have to meet a minimum POW difficulty regardless of what they say is allowed in order to get our message to propagate through the network.
ifrequiredAverageProofOfWorkNonceTrialsPerByte<defaults.networkDefaultProofOfWorkNonceTrialsPerByte:# We still have to meet a minimum POW difficulty regardless of what they say is allowed in order to get our message to propagate through the network.
logger.debug('Using averageProofOfWorkNonceTrialsPerByte: %s and payloadLengthExtraBytes: %s.'%(requiredAverageProofOfWorkNonceTrialsPerByte,requiredPayloadLengthExtraBytes))
queues.UISignalQueue.put(('updateSentItemStatusByAckdata',(ackdata,tr._translate("MainWindow","Doing work necessary to send message.\nReceiver\'s required difficulty: %1 and %2").arg(str(float(
# The demanded difficulty is more than we are willing
@ -689,8 +690,8 @@ class singleWorker(threading.Thread, StoppableThread):
sqlExecute(
'''UPDATE sent SET status='toodifficult' WHERE ackdata=? ''',
ackdata)
queues.UISignalQueue.put(('updateSentItemStatusByAckdata',(ackdata,tr._translate("MainWindow","Problem: The work demanded by the recipient (%1 and %2) is more difficult than you are willing to do. %3").arg(str(float(requiredAverageProofOfWorkNonceTrialsPerByte)/protocol.networkDefaultProofOfWorkNonceTrialsPerByte)).arg(str(float(
queues.UISignalQueue.put(('updateSentItemStatusByAckdata',(ackdata,tr._translate("MainWindow","Problem: The work demanded by the recipient (%1 and %2) is more difficult than you are willing to do. %3").arg(str(float(requiredAverageProofOfWorkNonceTrialsPerByte)/defaults.networkDefaultProofOfWorkNonceTrialsPerByte)).arg(str(float(
# it as default whenever the user changes the "method" selection for
# namecoin integration to "namecoind".
namecoinDefaultRpcPort="8336"
#If changed, these values will cause particularly unexpected behavior: You won't be able to either send or receive messages because the proof of work you do (or demand) won't match that done or demanded by others. Don't change them!
networkDefaultProofOfWorkNonceTrialsPerByte=1000#The amount of work that should be performed (and demanded) per byte of the payload.
networkDefaultPayloadLengthExtraBytes=1000#To make sending short messages a little more difficult, this value is added to the payload length for use in calculating the proof of work target.
@ -10,7 +11,6 @@ from distutils.version import StrictVersion
fromnamecoinimportensureNamecoinOptions
importpaths
importprotocol
importstate
storeConfigFilesInSameDirectoryAsProgramByDefault=False# The user may de-select Portable Mode in the settings if they want the config files to stay in the application data folder.
#If changed, these values will cause particularly unexpected behavior: You won't be able to either send or receive messages because the proof of work you do (or demand) won't match that done or demanded by others. Don't change them!
networkDefaultProofOfWorkNonceTrialsPerByte=1000#The amount of work that should be performed (and demanded) per byte of the payload.
networkDefaultPayloadLengthExtraBytes=1000#To make sending short messages a little more difficult, this value is added to the payload length for use in calculating the proof of work target.
#Compiled struct for packing/unpacking headers
#New code should use CreatePacket instead of Header.pack