Force DB Loader on New Block

This commit is contained in:
Ahmed Bodiwala 2013-11-21 22:51:29 +00:00
parent 716407e950
commit 621eec24c1
2 changed files with 6 additions and 2 deletions

View File

@ -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:

View File

@ -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