* 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:
parent
1e37684163
commit
12d39393b4
6 changed files with 50 additions and 15 deletions
|
@ -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')
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue