cleanup indentation, imports
authorForrest Voight <forrest@forre.st>
Mon, 25 Jul 2011 23:56:27 +0000 (19:56 -0400)
committerForrest Voight <forrest@forre.st>
Mon, 25 Jul 2011 23:56:27 +0000 (19:56 -0400)
p2pool/main.py
p2pool/util/skiplist.py
p2pool/worker_interface.py

index 46c5701..5e10da7 100644 (file)
@@ -8,7 +8,6 @@ import os
 import random
 import sqlite3
 import struct
-import subprocess
 import sys
 import time
 
@@ -174,13 +173,13 @@ def main(args):
                 #    peer2.send_getshares(hashes=[share_hash], parents=2000)
                 
                 if share.bitcoin_hash <= share.header['target']:
-                        print
-                        print 'GOT BLOCK! Passing to bitcoind! %x bitcoin: %x' % (share.hash % 2**32, share.bitcoin_hash,)
-                        print
-                        if factory.conn.value is not None:
-                            factory.conn.value.send_block(block=share.as_block(tracker, args.net))
-                        else:
-                            print 'No bitcoind connection! Erp!'
+                    print
+                    print 'GOT BLOCK! Passing to bitcoind! %x bitcoin: %x' % (share.hash % 2**32, share.bitcoin_hash,)
+                    print
+                    if factory.conn.value is not None:
+                        factory.conn.value.send_block(block=share.as_block(tracker, args.net))
+                    else:
+                        print 'No bitcoind connection! Erp!'
             
             if some_new:
                 share = shares[0]
index 2aa86ed..6ec24f7 100644 (file)
@@ -52,7 +52,7 @@ class SkipList(Base):
             # XXX could be better by combining updates
             for x in updates:
                 updates[x] = updates[x][0], self.combine_deltas(updates[x][1], delta) if updates[x][1] is not None else delta
-            
+        
         
         return item_hash
 
index 0739d17..85688f9 100644 (file)
@@ -1,11 +1,9 @@
 from __future__ import division
 
 import json
-import random
 
 from twisted.internet import defer
 
-from p2pool.bitcoin import getwork
 from p2pool.util import jsonrpc, deferred_resource
 
 
@@ -53,7 +51,7 @@ class WorkerInterface(jsonrpc.Server):
     
     def rpc_getwork(self, request, data=None):
         request.setHeader('X-Long-Polling', '/long-polling')
-
+        
         if data is not None:
             return self.response_callback(data)