move code that is specific to abe
authorThomasV <thomasv@gitorious>
Wed, 27 Jun 2012 18:33:43 +0000 (22:33 +0400)
committerThomasV <thomasv@gitorious>
Wed, 27 Jun 2012 18:33:43 +0000 (22:33 +0400)
backends/abe/__init__.py
server.py

index c143f42..61ecf44 100644 (file)
@@ -438,6 +438,11 @@ class BlockchainProcessor(Processor):
         self.store = AbeStore(config)
         self.block_number = -1
         self.watched_addresses = []
+
+        # catch_up first
+        n = self.store.main_iteration()
+        print "blockchain: %d blocks"%n
+
         threading.Timer(10, self.run_store_iteration).start()
 
     def process(self, request):
index f8073b5..c0a8300 100755 (executable)
--- a/server.py
+++ b/server.py
@@ -116,10 +116,6 @@ if __name__ == '__main__':
     chain_proc = backend.BlockchainProcessor(config)
     dispatcher.register('blockchain', chain_proc)
 
-    # catch_up first
-    n = chain_proc.store.main_iteration()
-    print "blockchain: %d blocks"%n
-
     server_proc = ServerProcessor(config)
     dispatcher.register('server', server_proc)