Role of the substrate state in electrochemical nucleation