diff --git a/lib/halfnode.py b/lib/halfnode.py index 9e9b822..b699d20 100644 --- a/lib/halfnode.py +++ b/lib/halfnode.py @@ -22,13 +22,18 @@ log.debug("Got to Halfnode") if settings.COINDAEMON_ALGO == 'scrypt': log.debug("########################################### Loading LTC Scrypt #########################################################") + import ltc_scrypt +elif settings.COINDAEMON_ALGO == 'scrypt-jane': import settings.SCRYPTJANE_NAME elif settings.COINDAEMON_ALGO == 'quark': log.debug("########################################### Loading Quark Support #########################################################") import quark_hash + elif settings.COINDAEMON_ALGO == 'skeinhash': + import skeinhash + else: log.debug("########################################### Loading SHA256 Support ######################################################") -if settings.COINDAEMON_TX == 'yes': +if settings.COINDAEMON_TX != False: log.debug("########################################### Loading SHA256 Transaction Message Support #########################################################") pass else: @@ -150,7 +155,7 @@ class CTransaction(object): def __init__(self): if settings.COINDAEMON_Reward == 'POW': self.nVersion = 1 - if settings.COINDAEMON_TX == 'yes': + if settings.COINDAEMON_TX != False: self.nVersion = 2 self.vin = [] self.vout = [] @@ -158,14 +163,14 @@ class CTransaction(object): self.sha256 = None elif settings.COINDAEMON_Reward == 'POS': self.nVersion = 1 - if settings.COINDAEMON_TX == 'yes': + if settings.COINDAEMON_TX != False: self.nVersion = 2 self.nTime = 0 self.vin = [] self.vout = [] self.nLockTime = 0 self.sha256 = None - if settings.COINDAEMON_TX == 'yes': + if settings.COINDAEMON_TX != False: self.strTxComment = "" def deserialize(self, f): @@ -182,7 +187,7 @@ class CTransaction(object): self.vout = deser_vector(f, CTxOut) self.nLockTime = struct.unpack(" target: return False + elif settings.COINDAEMON_ALGO == 'scrypt-jane': + if self.scryptjane > target: + return False + elif settings.COINDAEMON_ALGO == 'skein': + if self.skein > target: + return False else: if self.sha256 > target: return False