* cache pip requirements in dockerfile

* import blacklist into core
+ began work on blacklist command
* work on blacklist module
* modified dockerignore
This commit is contained in:
Kevin Froman 2018-08-10 17:13:58 -05:00
parent 1e37684163
commit 12d39393b4
No known key found for this signature in database
GPG key ID: 0D414D0FE405B63B
6 changed files with 50 additions and 15 deletions

View file

@ -186,6 +186,8 @@ class Onionr:
'addaddress': self.addAddress,
'list-peers': self.listPeers,
'blacklist-block': self.banBlock,
'add-file': self.addFile,
'addfile': self.addFile,
'listconn': self.listConn,
@ -258,6 +260,19 @@ class Onionr:
def getCommands(self):
return self.cmds
def banBlock(self):
try:
ban = sys.argv[2]
except IndexError:
while True:
ban = logger.readline('Enter a block hash:')
if self.onionrUtils.validateHash(ban):
if not self.onionrCore._blacklist.inBlacklist(ban):
self.onionrCore._blacklist.addToDB(ban)
return
def listConn(self):
self.onionrCore.daemonQueueAdd('connectedPeers')