Changeset View
Changeset View
Standalone View
Standalone View
src/seeder/bitcoin.cpp
Show First 20 Lines • Show All 246 Lines • ▼ Show 20 Lines | CSeederNode(const CService &ip, std::vector<CAddress> *vAddrIn) | ||||
you(ip, ServiceFlags(NODE_NETWORK | NODE_BITCOIN_CASH)) { | you(ip, ServiceFlags(NODE_NETWORK | NODE_BITCOIN_CASH)) { | ||||
if (time(nullptr) > 1329696000) { | if (time(nullptr) > 1329696000) { | ||||
vSend.SetVersion(209); | vSend.SetVersion(209); | ||||
vRecv.SetVersion(209); | vRecv.SetVersion(209); | ||||
} | } | ||||
} | } | ||||
bool Run() { | bool Run() { | ||||
// FIXME: This logic is duplicated with CConnman::ConnectNode for no | |||||
// good reason. | |||||
bool connected = false; | |||||
proxyType proxy; | |||||
if (you.IsValid()) { | |||||
bool proxyConnectionFailed = false; | bool proxyConnectionFailed = false; | ||||
if (!ConnectSocket(you, sock, nConnectTimeout, | |||||
&proxyConnectionFailed)) { | if (GetProxy(you.GetNetwork(), proxy)) { | ||||
connected = ConnectThroughProxy( | |||||
proxy, you.ToStringIP(), you.GetPort(), sock, | |||||
nConnectTimeout, &proxyConnectionFailed); | |||||
} else { | |||||
// no proxy needed (none set for target network) | |||||
connected = ConnectSocketDirectly(you, sock, nConnectTimeout); | |||||
} | |||||
} | |||||
if (!connected) { | |||||
return false; | return false; | ||||
} | } | ||||
PushVersion(); | PushVersion(); | ||||
Send(); | Send(); | ||||
bool res = true; | bool res = true; | ||||
int64_t now; | int64_t now; | ||||
▲ Show 20 Lines • Show All 75 Lines • Show Last 20 Lines |