celestiaorg / go-header

Go library with all the services needed to request, sync and store blockchain headers.
Apache License 2.0
19 stars 18 forks source link

refactor(p2p): subscriber.Stop logs but ignores error from unregister topic validator #127

Closed renaynay closed 6 months ago

renaynay commented 11 months ago

This PR was caused by the fact that we now no longer ignore the error from unregister topic validator.

@Wondertan brought up a good point that the API of Subscriber doesn't enforce SetVerifier so it's possible to successfully Start the Subscriber without mounting a validator on it, but Stop would fail due to no validator being present.

This PR reverts the change and logs/ignores the error from unregister topic validator.

codecov-commenter commented 11 months ago

Codecov Report

Merging #127 (ac6f728) into main (a8ce731) will decrease coverage by 0.05%. The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main     #127      +/-   ##
==========================================
- Coverage   65.01%   64.97%   -0.05%     
==========================================
  Files          39       39              
  Lines        3276     3275       -1     
==========================================
- Hits         2130     2128       -2     
- Misses        988      989       +1     
  Partials      158      158              
Files Coverage Δ
p2p/subscriber.go 43.20% <0.00%> (+0.52%) :arrow_up:

... and 1 file with indirect coverage changes