Current bitcoin-master on testnet, `maxconnections=8` in the config file. Running in VM that doesn't have public IP and is not reachable from the Internet.

Wait until you have 8 peers.

```
telnet localhost 18333
```

It will result in:

```
Assertion failed: (nMaxInbound > 0), function AcceptConnection, file net.cpp, line 973.
```

First found in https://github.com/bitcoin/bitcoin/pull/8996, but can be reproduced on master.

{
    
    
    
    
    const int64_t nOneWeek = 7*24*60*60;
    std::vector<CAddress> vSeedsOut;
    vSeedsOut.reserve(vSeedsIn.size());
    for (std::vector<SeedSpec6>::const_iterator i(vSeedsIn.begin()); i != vSeedsIn.end(); ++i)
    {
        struct in6_addr ip;
        memcpy(&ip, i->addr, sizeof(ip));
        CAddress addr(CService(ip, i->port), NODE_NETWORK);
        addr.nTime = GetTime() - GetRand(nOneWeek) - nOneWeek;
        vSeedsOut.push_back(addr);
    }
    return vSeedsOut;
}
CAddress GetLocalAddress(const CNetAddr *paddrPeer, ServiceFlags nLocalServices)