op-node: Fix panic when p2p server fails to start (#4493)
I only set `OpNode.server` to the created server if it starts up successfully. This alleviates an error where if creation succeeds, but startup does not, we attempt to stop the server which panics. This also adds logging to indicate that initialization failed. This logging primarily benefits users who call `node.New` directly rather than end users because there is already logging in the main function. I tested this manually with op-e2e & was able to reproduce the error & confirm that it is fixed.
Showing
Please register or sign in to comment