Close all p2p connections to the node. The state of the peers (such as txrequests) may not be fully cleared yet, even after this method returns.
(self)
| 837 | return len([peer for peer in self.getpeerinfo() if peer['subver'] == P2P_SUBVERSION]) |
| 838 | |
| 839 | def disconnect_p2ps(self): |
| 840 | """Close all p2p connections to the node. |
| 841 | The state of the peers (such as txrequests) may not be fully cleared |
| 842 | yet, even after this method returns.""" |
| 843 | for p in self.p2ps: |
| 844 | p.peer_disconnect() |
| 845 | del self.p2ps[:] |
| 846 | |
| 847 | self.wait_until(lambda: self.num_test_p2p_connections() == 0) |
| 848 | |
| 849 | def is_connected_to(self, other): |
| 850 | assert isinstance(other, TestNode) |
no test coverage detected