git://git.novaco.in
/
electrum-server.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
2d49862
)
wait until bitcoind is ready on startup
author
ThomasV
<thomasv@gitorious>
Thu, 2 May 2013 12:28:58 +0000 (16:28 +0400)
committer
ThomasV
<thomasv@gitorious>
Thu, 2 May 2013 12:28:58 +0000 (16:28 +0400)
backends/bitcoind/blockchain_processor.py
patch
|
blob
|
history
diff --git
a/backends/bitcoind/blockchain_processor.py
b/backends/bitcoind/blockchain_processor.py
index
d95764e
..
174d186
100644
(file)
--- a/
backends/bitcoind/blockchain_processor.py
+++ b/
backends/bitcoind/blockchain_processor.py
@@
-53,6
+53,15
@@
class BlockchainProcessor(Processor):
config.get('bitcoind', 'host'),
config.get('bitcoind', 'port'))
+ while True:
+ try:
+ self.bitcoind('getinfo')
+ break
+ except:
+ print_log('cannot contact bitcoind...')
+ time.sleep(5)
+ continue
+
self.height = 0
self.is_test = False
self.sent_height = 0