added intruction for nodes
This commit is contained in:
parent
edce30ea20
commit
77f811c455
4 changed files with 36 additions and 2 deletions
|
@ -41,6 +41,7 @@ class Core:
|
|||
self.blockDB = 'data/blocks.db'
|
||||
self.blockDataLocation = 'data/blocks/'
|
||||
self.addressDB = 'data/address.db'
|
||||
self.hsAdder = ''
|
||||
|
||||
if not os.path.exists('data/'):
|
||||
os.mkdir('data/')
|
||||
|
@ -48,6 +49,10 @@ class Core:
|
|||
os.mkdir('data/blocks/')
|
||||
if not os.path.exists(self.blockDB):
|
||||
self.createBlockDB()
|
||||
|
||||
if os.path.exists('data/hs/hostname'):
|
||||
with open('data/hs/hostname', 'r') as hs:
|
||||
self.hsAdder = hs.read()
|
||||
|
||||
self._utils = onionrutils.OnionrUtils(self)
|
||||
# Initialize the crypto object
|
||||
|
@ -540,4 +545,12 @@ class Core:
|
|||
self.addToBlockDB(addedHash, selfInsert=True)
|
||||
self.setBlockType(addedHash, header)
|
||||
retData = addedHash
|
||||
return retData
|
||||
return retData
|
||||
|
||||
def introduceNode(self):
|
||||
'''
|
||||
Introduces our node into the network by telling X many nodes our HS address
|
||||
'''
|
||||
nodeList = self.listAdders().split('\n')
|
||||
self.daemonQueueAdd('announceNode', nodeList)
|
||||
return
|
Loading…
Add table
Add a link
Reference in a new issue