CityOfZion / neo-python

Python Node and SDK for the NEO 2.x blockchain. For NEO 3.x go to our successor project neo-mamba
https://neo-python.readthedocs.io/en/latest/
MIT License
313 stars 189 forks source link

limit cli maxpeers #999

Closed ixje closed 5 years ago

ixje commented 5 years ago

What current issue(s) does this address, or what feature is it adding? the sc config maxpeers/minpeers command already has a 10 peers max limit imposed. The cli arguments did not.

How did you solve this problem? add argument choices limit

How did you make sure your solution works? manual testing. now gives the following error if a wrong argument is given

np-api-server: error: argument --maxpeers: invalid choice: 12 (choose from 1, 2, 3, 4, 5, 6, 7, 8, 9, 10)

Are there any special changes in the code that we should be aware of?

Please check the following, if applicable:

coveralls commented 5 years ago

Coverage Status

Coverage remained the same at 85.263% when pulling 9aa166eaeaa9ac1486f797fe9072005ac46b1b15 on ixje:fix-maxpeers into 338189c529d350ae69288decad893a68ce7b494f on CityOfZion:development.