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.

break;
            if (IsLimited(addr))
                continue;
            
            if ((addr.nServices & REQUIRED_SERVICES) != REQUIRED_SERVICES)
                continue;
            
            if (nANow - addr.nLastTry < 600 && nTries < 30)
                continue;
            
            if ((addr.nServices & nRelevantServices) != nRelevantServices && (nTries < 40 || nOutbound >= (nMaxOutbound >> 1)))
                continue;
            
            if (addr.GetPort() != Params().GetDefaultPort() && nTries < 50)
                continue;
            addrConnect = addr;
            break;
        }
        if (addrConnect.IsValid()) {
            if (fFeeler) {
                
                int randsleep = GetRandInt(FEELER_SLEEP_WINDOW * 1000);
                MilliSleep(randsleep);
                LogPrint("net", "Making feeler connection to %s\n", addrConnect.ToString());
            }
            OpenNetworkConnection(addrConnect, (int)setConnected.size() >= std::min(nMaxConnections - 1, 2), &grant, NULL, false, fFeeler);
        }
    }
}
std::vector<AddedNodeInfo> CConnman::GetAddedNodeInfo()