I'm tired of porting this forward, and I really can't think of a good reason NOT to allow this.
-port option to listen on arbitrary port #221
pull gavinandresen wants to merge 1 commits into bitcoin:master from gavinandresen:portoption changing 1 files +8 −7-
gavinandresen commented at 5:45 PM on May 13, 2011: contributor
-
sipa commented at 10:45 PM on May 13, 2011: member
After my dnslookup patch, CAddress's constructors changed to take host-order ports as arguments, so no need to do htons() on its argument.
-
TheBlueMatt commented at 11:17 PM on May 13, 2011: member
Hmmm...I think pulling this would cause even more complaints, as using a non-default port means no incoming connections (probably a 1 connection per a.b.x.y thing considering I would be running 2 nodes) and (in almost all of my testing) reduced outgoing ones (ie no outgoing connections, but this probably needs more testing). And, IMHO, the non-default port time-delay stuff is necessary until there is more discussion on the topic.
As a side note, this does not appear to apply cleanly to current master (because of sipa's mentioned htons() stuff).
-
gavinandresen commented at 11:28 PM on May 13, 2011: contributor
Did I screw up? I thought I got all the htons() spots, and I did test with a couple of -testnet nodes. And I rebased to current git-head (BlueMatt, are you up-to-date?)
-
TheBlueMatt commented at 11:40 PM on May 13, 2011: member
Ah, yes now it is rebased, I wrote that comment long before I posted it to do some more testing of connections.
-
laanwj commented at 7:28 AM on May 15, 2011: member
Yes please merge this. Depending on one port is kind of backwards in this age of ISP throttling and blocking.
-
sipa commented at 2:14 PM on May 15, 2011: member
gavin: my dnslookup patch changed the port argument of CAddress to always take a host-ordered number. Your line 1556 still calls CAddress with a network-ordered port number.
-
-port option to listen on arbitrary port 00bcfe0b7e
-
gavinandresen commented at 4:40 PM on May 15, 2011: contributor
sipa: thanks, I didn't realize CAddress had changed. BlueMatt: I missed a GetDefaultPort() in the UPnP code (fixed, if you use -port UPnP will map that port).
- jgarzik referenced this in commit 112262cb24 on May 17, 2011
- jgarzik merged this on May 17, 2011
- jgarzik closed this on May 17, 2011
- dexX7 referenced this in commit ad23a73661 on Dec 1, 2014
- sipa referenced this in commit 9d09322b41 on Mar 27, 2015
- dexX7 referenced this in commit 8eb3afa9f1 on Sep 3, 2015
- TheBlueMatt referenced this in commit 582b2934e6 on Oct 20, 2015
- ptschip referenced this in commit f218a99b95 on Jan 7, 2017
- deadalnix referenced this in commit 3b7ea633fb on Jan 19, 2017
- lateminer referenced this in commit 90c513d8a2 on Dec 9, 2017
- attilaaf referenced this in commit 95f9701cc4 on Jan 13, 2020
- cryptapus referenced this in commit a4967fca11 on May 3, 2021
- rajarshimaitra referenced this in commit 991398f494 on Aug 5, 2021
- DrahtBot locked this on Sep 8, 2021