• Joshua Gutow's avatar
    op-node: Fix panic when p2p server fails to start (#4493) · be730fd0
    Joshua Gutow authored
    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.
    be730fd0
Name
Last commit
Last update
..
chaincfg Loading commit data...
client Loading commit data...
cmd Loading commit data...
eth Loading commit data...
flags Loading commit data...
heartbeat Loading commit data...
metrics Loading commit data...
node Loading commit data...
p2p Loading commit data...
rollup Loading commit data...
sources Loading commit data...
testlog Loading commit data...
testutils Loading commit data...
version Loading commit data...
withdrawals Loading commit data...
.gitignore Loading commit data...
Dockerfile Loading commit data...
LICENSE Loading commit data...
Makefile Loading commit data...
README.md Loading commit data...
docker.go.work Loading commit data...
go.mod Loading commit data...
go.sum Loading commit data...
service.go Loading commit data...