From bcb05419db8a0c77bee388839ecc087ba5fa39a2 Mon Sep 17 00:00:00 2001 From: Jonathan Warren Date: Sun, 12 Oct 2014 23:22:21 -0400 Subject: [PATCH] updated defaultKnownNodes --- src/class_singleWorker.py | 8 +++++--- src/defaultKnownNodes.py | 10 +++++++++- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/class_singleWorker.py b/src/class_singleWorker.py index 6282f9eb..c238f136 100644 --- a/src/class_singleWorker.py +++ b/src/class_singleWorker.py @@ -220,7 +220,7 @@ class singleWorker(threading.Thread): myAddress, 'payloadlengthextrabytes')) if int(time.time()) < 1416175200: # Sun, 16 Nov 2014 22:00:00 GMT - signedData = pack('>Q', signedTimeForProtocolV2) + payload[12:] + signedData = pack('>I', signedTimeForProtocolV2) + payload[12:] else: signedData = payload @@ -230,10 +230,12 @@ class singleWorker(threading.Thread): # Do the POW for this pubkey message target = 2 ** 64 / (shared.networkDefaultProofOfWorkNonceTrialsPerByte*(len(payload) + 8 + shared.networkDefaultPayloadLengthExtraBytes + ((TTL*(len(payload)+8+shared.networkDefaultPayloadLengthExtraBytes))/(2 ** 16)))) - print '(For pubkey message) Doing proof of work...' + with shared.printLock: + print '(For pubkey message) Doing proof of work...' initialHash = hashlib.sha512(payload).digest() trialValue, nonce = proofofwork.run(target, initialHash) - print '(For pubkey message) Found proof of work', trialValue, 'Nonce:', nonce + with shared.printLock: + print '(For pubkey message) Found proof of work. Nonce:', nonce payload = pack('>Q', nonce) + payload inventoryHash = calculateInventoryHash(payload) diff --git a/src/defaultKnownNodes.py b/src/defaultKnownNodes.py index d46171d5..3a7fe309 100644 --- a/src/defaultKnownNodes.py +++ b/src/defaultKnownNodes.py @@ -12,8 +12,16 @@ def createDefaultKnownNodes(appdata): stream1 = {} #stream1[shared.Peer('2604:2000:1380:9f:82e:148b:2746:d0c7', 8080)] = int(time.time()) + stream1[shared.Peer('23.239.9.147', 8444)] = int(time.time()) + stream1[shared.Peer('98.218.125.214', 8444)] = int(time.time()) + stream1[shared.Peer('192.121.170.162', 8444)] = int(time.time()) + stream1[shared.Peer('108.61.72.12', 28444)] = int(time.time()) stream1[shared.Peer('158.222.211.81', 8080)] = int(time.time()) - stream1[shared.Peer('85.214.194.88', 8444)] = int(time.time()) + stream1[shared.Peer('79.163.240.110', 8446)] = int(time.time()) + stream1[shared.Peer('178.62.154.250', 8444)] = int(time.time()) + stream1[shared.Peer('178.62.155.6', 8444)] = int(time.time()) + stream1[shared.Peer('178.62.155.8', 8444)] = int(time.time()) + stream1[shared.Peer('68.42.42.120', 8444)] = int(time.time()) ############# Stream 2 ################# stream2 = {}