def getDecimalValue(key): return DataType.asDecimal(Config.config[key])
def getDifficultyFromBits(bits): target = getTargetFromBits(bits) genesisBits = Config.getIntValue('GENESIS_BLOCK_DIFFICULTY_BITS', 16) genesisTarget = getTargetFromBits(genesisBits) return DataType.asDecimal(genesisTarget) / DataType.asDecimal(target)