src/net.cpp
static std::vector<CAddress> convertSeed6(const std::vector<SeedSpec6> &vSeedsIn)
{
    // 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 a random 'last seen time' of between one and two
    // weeks ago.
    const int64_t nOneWeek = 7*24*60*60;
    std::vector<CAddress> vSeedsOut;
    vSeedsOut.reserve(vSeedsIn.size());
    FastRandomContext rng;
    for (const auto& seed_in : vSeedsIn) {
        struct in6_addr ip;
        memcpy(&ip, seed_in.addr, sizeof(ip));
        CAddress addr(CService(ip, seed_in.port), GetDesirableServiceFlags(NODE_NONE));
        addr.nTime = GetTime() - rng.randrange(nOneWeek) - nOneWeek;
        vSeedsOut.push_back(addr);
    }
    return vSeedsOut;
}
//! Convert the pnSeed6 array into usable address objects.
Convert the pnSeed6 array into usable address objects.
Convert the pnSeed6 array into usable address objects .
static std::vector<CAddress> convertSeed6(const std::vector<SeedSpec6> &vSeedsIn)
{
    const int64_t nOneWeek = 7*24*60*60;
    std::vector<CAddress> vSeedsOut;
    vSeedsOut.reserve(vSeedsIn.size());
    FastRandomContext rng;
    for (const auto& seed_in : vSeedsIn) {
        struct in6_addr ip;
        memcpy(&ip, seed_in.addr, sizeof(ip));
        CAddress addr(CService(ip, seed_in.port), GetDesirableServiceFlags(NODE_NONE));
        addr.nTime = GetTime() - rng.randrange(nOneWeek) - nOneWeek;
        vSeedsOut.push_back(addr);
    }
    return vSeedsOut;
}
static std :: vector < CAddress > convertSeed6 ( const std :: vector < SeedSpec6 > & vSeedsIn ) { const int64_t nOneWeek = 7 * 24 * 60 * 60 ; std :: vector < CAddress > vSeedsOut ; vSeedsOut . reserve ( vSeedsIn . size ( ) ) ; FastRandomContext rng ; for ( const auto & seed_in : vSeedsIn ) { struct in6_addr ip ; memcpy ( & ip , seed_in . addr , sizeof ( ip ) ) ; CAddress addr ( CService ( ip , seed_in . port ) , GetDesirableServiceFlags ( NODE_NONE ) ) ; addr . nTime = GetTime ( ) - rng . randrange ( nOneWeek ) - nOneWeek ; vSeedsOut . push_back ( addr ) ; } return vSeedsOut ; }
Convert the pnSeed6 array into usable address objects.
Convert the pnSeed6 array into usable address objects .
// 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 a random 'last seen time' of between one and two // weeks ago.