block_number should return -1 if we know the DB is not up to date

This commit is contained in:
ThomasV 2012-02-08 12:07:42 +03:00
parent 2b628a90d4
commit 252bb945a9
1 changed files with 4 additions and 0 deletions

View File

@ -749,8 +749,12 @@ if __name__ == '__main__':
store.catch_up()
memorypool_update(store)
block_number = store.get_block_number(1)
except IOError:
print "IOError: cannot reach bitcoind"
block_number = -1
except:
traceback.print_exc(file=sys.stdout)
block_number = -1
finally:
dblock.release()
time.sleep(10)