Page MenuHomePhabricator

net: assert CNode::m_inbound_onion is inbound in ctor, add getter, unit tests
ClosedPublic

Authored by PiRK on Feb 3 2022, 10:07.

Details

Summary

test: fix constructing CNode with invalid inbound_onion

as CNode ctor should only be passed inbound_onion = true
when the connection is inbound

net: assert CNode::m_inbound_onion is inbound in ctor

and drop an unneeded check in CNode::ConnectedThroughNetwork()

net: add CNode::IsInboundOnion() public getter and unit tests

This is a backport of core#20210

Test Plan

ninja all check-all

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable