Currently, initial registration performs 2 node initialisations (one before & one after registering the node). This can be seen in InitialRegistrationCli.runProgram(). This is problematic for some situations where the node initialisation does not expect to be called multiple times for a single operation, e.g. see ENT-3947.
This is task is to remove the second initialisation in order to alleviate the problem partially. Initial registration will still trigger a node initialisation, but only a single one thus reducing the number of issues.
This can be done in the following way:
in InitialRegistrationCli, call generateAndSaveNodeInfo on the node that has already been initialised and passed in as a parameter
in AbstractNode.initKeyStores(), the resync of the CryptoService will need to be done always, not only when devMode is enabled.