I'm on the newest version of Litecoin, and I modified it for a little project, but now I'm stuck at "Connecting to peers" with 0 blocks known. The command "setgenerate" has been removed, and I cannot use cpuminer to mine either, as it gives a 500 internal server error. All answers I find are outdated.
First of all you need to run two peers (one of them will has
server=1 in your altcoin.conf and the other peer will only have
addnode=server_node_ip), once you see your connection in the peer tab you can start mining from the debug console typing
generatetoaddress n_blocks address
Let me know if you could get it working or if you need any help
You actually don't need to be connected to any other node to mine your first block, or any block for that matter from within the core. Simply use youraltcoin-cli generate nblocks in a terminal with the core running, or use generate nblocks from within the built-in console in the core (in the debug window).
If you wish to use a mining pool or to solo mine your coin externally with mining software (such as cpuminer), you will need at least 2 nodes on the network that are in sync.