This PR:
- Adds test coverage for an invalid
commandinaddnode. - Rename
test_getaddednodeinfototest_addnode_getaddednodeinfoand its log since this function also testsaddnodeand it doesn't worth to split into 2 ones. - Makes it clear in docs that
nodeinaddnoderefers to the node's address. It seemed a little weird for me "The node (see getpeerinfo for nodes)", it could mean a lot of things e.g. the node id. - Some small improv/clean-up: use
constwhere possible, rename some vars, and remove the check for nullance forcommandsince it's a non-optional field.