forked from celestiaorg/go-header
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(p2p): catch rare nil Header (celestiaorg#234)
A subscription might be started without the PubSub validator fully registered, causing nil pointer deref. This was observed as a flake in tests and sometimes even on the celestia node start. It's time to fix this issue altogether. The naive fix would check for nil, discarding a valid header message. On the other hand, this fix ensures proper order of events, guaranteeing that a valid message is never processed by subscription before the user's header verifier is set. Related to celestiaorg/celestia-node#4001
- Loading branch information
Showing
2 changed files
with
99 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters