Changeset View
Changeset View
Standalone View
Standalone View
src/net.cpp
Show First 20 Lines • Show All 122 Lines • ▼ Show 20 Lines | int nBestReachability = -1; | ||||
nBestReachability = nReachability; | nBestReachability = nReachability; | ||||
nBestScore = nScore; | nBestScore = nScore; | ||||
} | } | ||||
} | } | ||||
} | } | ||||
return nBestScore >= 0; | return nBestScore >= 0; | ||||
} | } | ||||
//! Convert the pnSeeds6 array into usable address objects. | //! Convert the pnSeed6 array into usable address objects. | ||||
static std::vector<CAddress> | static std::vector<CAddress> | ||||
convertSeed6(const std::vector<SeedSpec6> &vSeedsIn) { | convertSeed6(const std::vector<SeedSpec6> &vSeedsIn) { | ||||
// It'll only connect to one or two seed nodes because once it connects, | // It'll only connect to one or two seed nodes because once it connects, | ||||
// it'll get a pile of addresses with newer timestamps. Seed nodes are given | // it'll get a pile of addresses with newer timestamps. Seed nodes are given | ||||
// a random 'last seen time' of between one and two weeks ago. | // a random 'last seen time' of between one and two weeks ago. | ||||
const int64_t nOneWeek = 7 * 24 * 60 * 60; | const int64_t nOneWeek = 7 * 24 * 60 * 60; | ||||
std::vector<CAddress> vSeedsOut; | std::vector<CAddress> vSeedsOut; | ||||
vSeedsOut.reserve(vSeedsIn.size()); | vSeedsOut.reserve(vSeedsIn.size()); | ||||
▲ Show 20 Lines • Show All 2,713 Lines • Show Last 20 Lines |