<commit_before>import sys
import logging

#no logging for the node

#logname = 'nodes.log'
#logging.basicConfig(
#     level=logging.DEBUG,
#     filemode='a',
#     filename=logname,
#     format="%(levelname)s:%(name)s:%(funcName)s:%(message)s")

from neo.Network.NeoNode import NeoNode
from neo.Network.NeoNodeFactory import NeoFactory

from twisted.internet import reactor, task

from neo.Core.Blockchain import Blockchain
from neo.Implementations.Blockchains.LevelDB.LevelDBBlockchain import LevelDBBlockchain
from neo import Settings


blockchain = LevelDBBlockchain(Settings.LEVELDB_PATH)
Blockchain.RegisterBlockchain(blockchain)



from twisted.internet.endpoints import TCP4ClientEndpoint, connectProtocol

dbloop = task.LoopingCall(Blockchain.Default().PersistBlocks)
dbloop.start(.001)

for bootstrap in Settings.SEED_LIST:
    host, port = bootstrap.split(":")
    point = TCP4ClientEndpoint(reactor, host, int(port))
    d = connectProtocol(point, NeoNode(NeoFactory))

reactor.run()<commit_msg>fixes #1<commit_after>import sys
import logging

#no logging for the node

#logname = 'nodes.log'
#logging.basicConfig(
#     level=logging.DEBUG,
#     filemode='a',
#     filename=logname,
#     format="%(levelname)s:%(name)s:%(funcName)s:%(message)s")


from neo.Network.NodeLeader import NodeLeader
from twisted.internet import reactor, task

from neo.Core.Blockchain import Blockchain
from neo.Implementations.Blockchains.LevelDB.LevelDBBlockchain import LevelDBBlockchain
from neo import Settings


blockchain = LevelDBBlockchain(Settings.LEVELDB_PATH)
Blockchain.RegisterBlockchain(blockchain)



from twisted.internet.endpoints import TCP4ClientEndpoint, connectProtocol

dbloop = task.LoopingCall(Blockchain.Default().PersistBlocks)
dbloop.start(.001)

#for bootstrap in Settings.SEED_LIST:
#    host, port = bootstrap.split(":")
#    point = TCP4ClientEndpoint(reactor, host, int(port))
#    d = connectProtocol(point, NeoNode(NeoFactory))

NodeLeader.Instance().Start()

reactor.run()
{'fraction_non_alphanumeric': 0.10828343313373254, 'fraction_numerical': 0.0054890219560878245, 'mean_word_length': 6.010489510489511, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7596878', 'n_tokens_mistral': 653, 'n_tokens_neox': 620, 'n_words': 131}