fixed bug where HeightTracker updating could cause set_real_work2 to prematurely run
authorForrest Voight <forrest@forre.st>
Thu, 8 Dec 2011 09:11:29 +0000 (04:11 -0500)
committerForrest Voight <forrest@forre.st>
Thu, 8 Dec 2011 09:11:29 +0000 (04:11 -0500)
p2pool/main.py

index cdee056..ade2873 100644 (file)
@@ -193,14 +193,15 @@ def main(args, net):
                 )
                 requested[share_hash] = t, count + 1
         pre_current_work.changed.watch(lambda _: set_real_work2())
-        pre_merged_work.changed.watch(lambda _: set_real_work2())
-        ht.updated.watch(set_real_work2)
         
         print 'Initializing work...'
         yield set_real_work1()
         print '    ...success!'
         print
         
+        pre_merged_work.changed.watch(lambda _: set_real_work2())
+        ht.updated.watch(set_real_work2)
+        
         @defer.inlineCallbacks
         def set_merged_work():
             if not args.merged_url: