Onionr/onionr/onionrdaemontools.py
Kevin Froman 0ae052336c
+ onionr now introduces automatically
+ added daemon tools file
+ added .dockerignore
2018-08-07 02:31:53 -05:00

29 lines
1.2 KiB
Python

'''
Onionr - P2P Microblogging Platform & Social network.
Contains the CommunicatorUtils class which contains useful functions for the communicator daemon
'''
'''
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
'''
import onionrexceptions, onionrpeers
class DaemonTools:
def __init__(self, daemon):
self.daemon = daemon
def announceNode(self):
'''Announce our node to our peers'''
peer = self.daemon.pickOnlinePeer()
self.daemon.peerAction(peer, 'announce', self.daemon._core.hsAddress)
self.daemon.decrementThreadCount('announceNode')