Commit e58605e
committed
Merge bitcoin/bitcoin#31854: net: reduce CAddress usage to CService or CNetAddr
cd4bfae net: reduce CAddress usage to CService or CNetAddr (Vasil Dimov)
Pull request description:
Using `CAddress` when only `CService` or `CNetAddr` is needed is excessive and confusing. Fix those occurrences to use the class they need:
* `CConnman::CalculateKeyedNetGroup()` needs `CNetAddr`, not `CAddress`, thus change its argument.
* Both callers of `CConnman::CreateNodeFromAcceptedSocket()` create a dummy `CAddress` from `CService`, so use `CService` instead.
* `GetBindAddress()` only needs to return `CService`.
* `CNode::addrBind` only needs to be `CService`.
ACKs for top commit:
Sjors:
ACK cd4bfae
achow101:
ACK cd4bfae
hodlinator:
ACK cd4bfae
laanwj:
Code review ACK cd4bfae
Tree-SHA512: 0b41c1519784eeeaf9926c6a4d24f583b90c3376741f37a3199a3808b0dd6d143d3f929bd7c06f87b031f4fc1c2bd7a6dfc7d715ec1f79bf36b862c00fd670853 files changed
+23
-24
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
380 | 380 | | |
381 | 381 | | |
382 | 382 | | |
383 | | - | |
384 | | - | |
| 383 | + | |
| 384 | + | |
385 | 385 | | |
386 | | - | |
| 386 | + | |
387 | 387 | | |
388 | 388 | | |
389 | 389 | | |
| |||
458 | 458 | | |
459 | 459 | | |
460 | 460 | | |
461 | | - | |
| 461 | + | |
462 | 462 | | |
463 | 463 | | |
464 | 464 | | |
| |||
495 | 495 | | |
496 | 496 | | |
497 | 497 | | |
498 | | - | |
| 498 | + | |
499 | 499 | | |
500 | 500 | | |
501 | 501 | | |
| |||
1736 | 1736 | | |
1737 | 1737 | | |
1738 | 1738 | | |
1739 | | - | |
1740 | 1739 | | |
1741 | 1740 | | |
1742 | 1741 | | |
| |||
1746 | 1745 | | |
1747 | 1746 | | |
1748 | 1747 | | |
| 1748 | + | |
1749 | 1749 | | |
1750 | 1750 | | |
1751 | 1751 | | |
1752 | | - | |
| 1752 | + | |
1753 | 1753 | | |
1754 | 1754 | | |
1755 | | - | |
| 1755 | + | |
1756 | 1756 | | |
1757 | 1757 | | |
1758 | 1758 | | |
| |||
1762 | 1762 | | |
1763 | 1763 | | |
1764 | 1764 | | |
1765 | | - | |
1766 | | - | |
| 1765 | + | |
| 1766 | + | |
1767 | 1767 | | |
1768 | 1768 | | |
1769 | 1769 | | |
| |||
1830 | 1830 | | |
1831 | 1831 | | |
1832 | 1832 | | |
1833 | | - | |
| 1833 | + | |
1834 | 1834 | | |
1835 | 1835 | | |
1836 | 1836 | | |
| |||
3105 | 3105 | | |
3106 | 3106 | | |
3107 | 3107 | | |
3108 | | - | |
3109 | | - | |
| 3108 | + | |
3110 | 3109 | | |
3111 | 3110 | | |
3112 | 3111 | | |
| |||
3796 | 3795 | | |
3797 | 3796 | | |
3798 | 3797 | | |
3799 | | - | |
| 3798 | + | |
3800 | 3799 | | |
3801 | 3800 | | |
3802 | 3801 | | |
| |||
3933 | 3932 | | |
3934 | 3933 | | |
3935 | 3934 | | |
3936 | | - | |
| 3935 | + | |
3937 | 3936 | | |
3938 | 3937 | | |
3939 | 3938 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
214 | | - | |
| 214 | + | |
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
| |||
707 | 707 | | |
708 | 708 | | |
709 | 709 | | |
710 | | - | |
| 710 | + | |
711 | 711 | | |
712 | 712 | | |
713 | 713 | | |
| |||
883 | 883 | | |
884 | 884 | | |
885 | 885 | | |
886 | | - | |
| 886 | + | |
887 | 887 | | |
888 | 888 | | |
889 | 889 | | |
| |||
1312 | 1312 | | |
1313 | 1313 | | |
1314 | 1314 | | |
1315 | | - | |
1316 | | - | |
| 1315 | + | |
| 1316 | + | |
1317 | 1317 | | |
1318 | 1318 | | |
1319 | 1319 | | |
| |||
1350 | 1350 | | |
1351 | 1351 | | |
1352 | 1352 | | |
1353 | | - | |
| 1353 | + | |
1354 | 1354 | | |
1355 | 1355 | | |
1356 | 1356 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
671 | 671 | | |
672 | 672 | | |
673 | 673 | | |
674 | | - | |
| 674 | + | |
675 | 675 | | |
676 | 676 | | |
677 | 677 | | |
| |||
692 | 692 | | |
693 | 693 | | |
694 | 694 | | |
695 | | - | |
| 695 | + | |
696 | 696 | | |
697 | 697 | | |
698 | 698 | | |
| |||
829 | 829 | | |
830 | 830 | | |
831 | 831 | | |
832 | | - | |
| 832 | + | |
833 | 833 | | |
834 | 834 | | |
835 | 835 | | |
| |||
0 commit comments