Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not call
node.GetChains()
if node is nil (#1588)
In `NewSessionNodes`, the variable `node` can be `nil` if the node is unstaked between `sessionCtx` and `ctx`. In such a case, `node.GetChains()` causes a panic. This patch makes sure we don't call it if the `node` is `nil`. This is a regression from #1582. ## Description <!-- reviewpad:summarize:start --> ### Summary generated by Reviewpad on 21 Dec 23 10:23 UTC This pull request fixes a regression introduced in #1582. The patch ensures that the function `node.GetChains()` is not called if the `node` is `nil`, preventing a panic in the `NewSessionNodes` function. <!-- reviewpad:summarize:end -->
- Loading branch information