Force DB Loader on New Block
This commit is contained in:
parent
716407e950
commit
621eec24c1
@ -30,7 +30,7 @@ else:
|
|||||||
print("########################################### NOT Loading POS Support ######################################################")
|
print("########################################### NOT Loading POS Support ######################################################")
|
||||||
pass
|
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 #########################################################")
|
print("########################################### Loading SHA256 Transaction Message Support #########################################################")
|
||||||
import ltc_scrypt
|
import ltc_scrypt
|
||||||
else:
|
else:
|
||||||
|
|||||||
@ -7,6 +7,9 @@ from stratum.pubsub import Pubsub
|
|||||||
from interfaces import Interfaces
|
from interfaces import Interfaces
|
||||||
from subscription import MiningSubscription
|
from subscription import MiningSubscription
|
||||||
from lib.exceptions import SubmitException
|
from lib.exceptions import SubmitException
|
||||||
|
import DBInterface
|
||||||
|
dbi = DBInterface.DBInterface()
|
||||||
|
dbi.init_main()
|
||||||
|
|
||||||
import lib.logger
|
import lib.logger
|
||||||
log = lib.logger.get_logger('mining')
|
log = lib.logger.get_logger('mining')
|
||||||
@ -29,7 +32,8 @@ class MiningService(GenericService):
|
|||||||
See blocknotify.sh in /scripts/ for more info.'''
|
See blocknotify.sh in /scripts/ for more info.'''
|
||||||
|
|
||||||
log.info("New block notification received")
|
log.info("New block notification received")
|
||||||
Interfaces.template_registry.update_block()
|
dbi.do_import(self, dbi, True)
|
||||||
|
Interfaces.template_registry.update_block()
|
||||||
return True
|
return True
|
||||||
|
|
||||||
@admin
|
@admin
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user