Skip to content

Commit e38eadb

Browse files
committed
test: change comments to self.log.info for test_addnode_getaddednodeinfo
1 parent c838e3b commit e38eadb

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

test/functional/rpc_net.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -237,35 +237,35 @@ def test_getnetworkinfo(self):
237237
def test_addnode_getaddednodeinfo(self):
238238
self.log.info("Test addnode and getaddednodeinfo")
239239
assert_equal(self.nodes[0].getaddednodeinfo(), [])
240-
# add a node (node2) to node0
240+
self.log.info("Add a node (node2) to node0")
241241
ip_port = "127.0.0.1:{}".format(p2p_port(2))
242242
self.nodes[0].addnode(node=ip_port, command='add')
243-
# try to add an equivalent ip
244-
# (note that OpenBSD doesn't support the IPv4 shorthand notation with omitted zero-bytes)
243+
self.log.info("Try to add an equivalent ip and check it fails")
244+
self.log.debug("(note that OpenBSD doesn't support the IPv4 shorthand notation with omitted zero-bytes)")
245245
if platform.system() != "OpenBSD":
246246
ip_port2 = "127.1:{}".format(p2p_port(2))
247247
assert_raises_rpc_error(-23, "Node already added", self.nodes[0].addnode, node=ip_port2, command='add')
248-
# check that the node has indeed been added
248+
self.log.info("Check that the node has indeed been added")
249249
added_nodes = self.nodes[0].getaddednodeinfo()
250250
assert_equal(len(added_nodes), 1)
251251
assert_equal(added_nodes[0]['addednode'], ip_port)
252-
# check that filtering by node works
252+
self.log.info("Check that filtering by node works")
253253
self.nodes[0].addnode(node="11.22.33.44", command='add')
254254
first_added_node = self.nodes[0].getaddednodeinfo(node=ip_port)
255255
assert_equal(added_nodes, first_added_node)
256256
assert_equal(len(self.nodes[0].getaddednodeinfo()), 2)
257-
# check that node cannot be added again
257+
self.log.info("Check that node cannot be added again")
258258
assert_raises_rpc_error(-23, "Node already added", self.nodes[0].addnode, node=ip_port, command='add')
259-
# check that node can be removed
259+
self.log.info("Check that node can be removed")
260260
self.nodes[0].addnode(node=ip_port, command='remove')
261261
added_nodes = self.nodes[0].getaddednodeinfo()
262262
assert_equal(len(added_nodes), 1)
263263
assert_equal(added_nodes[0]['addednode'], "11.22.33.44")
264-
# check that an invalid command returns an error
264+
self.log.info("Check that an invalid command returns an error")
265265
assert_raises_rpc_error(-1, 'addnode "node" "command"', self.nodes[0].addnode, node=ip_port, command='abc')
266-
# check that trying to remove the node again returns an error
266+
self.log.info("Check that trying to remove the node again returns an error")
267267
assert_raises_rpc_error(-24, "Node could not be removed", self.nodes[0].addnode, node=ip_port, command='remove')
268-
# check that a non-existent node returns an error
268+
self.log.info("Check that a non-existent node returns an error")
269269
assert_raises_rpc_error(-24, "Node has not been added", self.nodes[0].getaddednodeinfo, '1.1.1.1')
270270

271271
def test_service_flags(self):

0 commit comments

Comments
 (0)