From 621eec24c150e812e237533b4b6d3adaa13d8847 Mon Sep 17 00:00:00 2001 From: Ahmed Bodiwala Date: Thu, 21 Nov 2013 22:51:29 +0000 Subject: [PATCH] Force DB Loader on New Block --- lib/halfnode.py | 2 +- mining/service.py | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/halfnode.py b/lib/halfnode.py index b5b0e64..6a9e211 100644 --- a/lib/halfnode.py +++ b/lib/halfnode.py @@ -30,7 +30,7 @@ else: print("########################################### NOT Loading POS Support ######################################################") pass -if settings.COINDAEMON_Reward == 'POS' and settings.COINDAEMON_SH256_TX = 'yes': +if settings.COINDAEMON_Reward == 'POS' and settings.COINDAEMON_SH256_TX == 'yes': print("########################################### Loading SHA256 Transaction Message Support #########################################################") import ltc_scrypt else: diff --git a/mining/service.py b/mining/service.py index ef8be29..e56b06c 100644 --- a/mining/service.py +++ b/mining/service.py @@ -7,6 +7,9 @@ from stratum.pubsub import Pubsub from interfaces import Interfaces from subscription import MiningSubscription from lib.exceptions import SubmitException +import DBInterface +dbi = DBInterface.DBInterface() +dbi.init_main() import lib.logger log = lib.logger.get_logger('mining') @@ -29,7 +32,8 @@ class MiningService(GenericService): See blocknotify.sh in /scripts/ for more info.''' log.info("New block notification received") - Interfaces.template_registry.update_block() + dbi.do_import(self, dbi, True) + Interfaces.template_registry.update_block() return True @admin