work on docs

This commit is contained in:
Kevin Froman 2019-04-11 17:01:18 -05:00
parent bd275abe42
commit 7c4e8bfa73
4 changed files with 59 additions and 9 deletions

View file

@ -186,7 +186,7 @@ class PublicAPI:
powHash = powHash.decode()
except AttributeError:
pass
if powHash.startswith('0000'):
if powHash.startswith('00000'):
newNode = clientAPI._core._utils.bytesToStr(newNode)
if clientAPI._core._utils.validateID(newNode) and not newNode in clientAPI._core.onionrInst.communicatorInst.newPeers:
clientAPI._core.onionrInst.communicatorInst.newPeers.append(newNode)
@ -194,6 +194,8 @@ class PublicAPI:
else:
logger.warn(newNode.decode() + ' failed to meet POW: ' + powHash)
resp = Response(resp)
if resp == 'failure':
return resp, 406
return resp
@app.route('/upload', methods=['post'])