send long poll when we get transactions to include
authorForrest Voight <forrest@forre.st>
Sun, 10 Jun 2012 23:19:35 +0000 (19:19 -0400)
committerForrest Voight <forrest@forre.st>
Sun, 10 Jun 2012 23:19:35 +0000 (19:19 -0400)
p2pool/main.py

index 2f2e553..8fb1cfc 100644 (file)
@@ -299,7 +299,8 @@ def main(args, net, datadir_path, merged_urls, worker_endpoint):
         
         @current_work.transitioned.watch
         def _(before, after):
-            if any(before[x] != after[x] for x in ['version', 'previous_block', 'bits']):
+            # trigger LP if version/previous_block/bits changed or transactions changed from nothing
+            if any(before[x] != after[x] for x in ['version', 'previous_block', 'bits']) or (not before['transactions'] and after['transactions']):
                 lp_signal.happened()