From: ThomasV Date: Mon, 4 Jun 2012 19:34:15 +0000 (+0400) Subject: overload catch_up so that exceptions are raised X-Git-Url: https://git.novaco.in/?p=electrum-server.git;a=commitdiff_plain;h=fc8ff37a474a48b8037d3f6d7b7ed9dc8299ce74 overload catch_up so that exceptions are raised --- diff --git a/backends/abe/__init__.py b/backends/abe/__init__.py index a9d90fa..07a0bf2 100644 --- a/backends/abe/__init__.py +++ b/backends/abe/__init__.py @@ -373,6 +373,19 @@ class AbeStore(Datastore_class): return block_number + def catch_up(store): + # if there is an exception, do rollback and then re-raise the exception + for dircfg in store.datadirs: + try: + store.catch_up_dir(dircfg) + except Exception, e: + store.log.exception("Failed to catch up %s", dircfg) + store.rollback() + raise e + + + + from processor import Processor class BlockchainProcessor(Processor):