• Matthew Slipper's avatar
    op-node: Fix panic after closing P2P (#13106) · 51a036d2
    Matthew Slipper authored
    When the op-node is closed, it also closes the P2P node. To prevent future usage, `n.p2pNode` is set to `nil`. However, the AsyncGossiper can still sometimes send gossip messages to the `OpNode` struct after close. Since `n.p2pNode` is `nil` at this point, the node would panic. This PR updates the `OpNode` implementation to check for this case. Access is protected via a mutex to prevent concurrency problems.
    51a036d2
node.go 25.9 KB