ChainSafe / js-libp2p-gossipsub

TypeScript implementation of Gossipsub
Apache License 2.0
145 stars 43 forks source link

feat!: close streams gracefully #458

Closed achingbrain closed 1 year ago

achingbrain commented 1 year ago

BREAKING CHANGE: stream close methods are now asyc, requires libp2p@0.46.x or later

codecov-commenter commented 1 year ago

Codecov Report

Patch coverage: 99.15% and no project coverage change.

Comparison is base (83b8e61) 82.30% compared to head (aa987a6) 82.30%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #458 +/- ## ======================================= Coverage 82.30% 82.30% ======================================= Files 48 48 Lines 12035 12039 +4 Branches 1281 1286 +5 ======================================= + Hits 9905 9909 +4 Misses 2130 2130 ``` | [Files Changed](https://app.codecov.io/gh/ChainSafe/js-libp2p-gossipsub/pull/458?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ChainSafe) | Coverage Δ | | |---|---|---| | [src/index.ts](https://app.codecov.io/gh/ChainSafe/js-libp2p-gossipsub/pull/458?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ChainSafe#diff-c3JjL2luZGV4LnRz) | `69.97% <97.61%> (-0.04%)` | :arrow_down: | | [src/metrics.ts](https://app.codecov.io/gh/ChainSafe/js-libp2p-gossipsub/pull/458?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ChainSafe#diff-c3JjL21ldHJpY3MudHM=) | `18.99% <100.00%> (+0.66%)` | :arrow_up: | | [src/score/peer-score-params.ts](https://app.codecov.io/gh/ChainSafe/js-libp2p-gossipsub/pull/458?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ChainSafe#diff-c3JjL3Njb3JlL3BlZXItc2NvcmUtcGFyYW1zLnRz) | `98.21% <100.00%> (ø)` | | | [src/score/peer-score-thresholds.ts](https://app.codecov.io/gh/ChainSafe/js-libp2p-gossipsub/pull/458?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ChainSafe#diff-c3JjL3Njb3JlL3BlZXItc2NvcmUtdGhyZXNob2xkcy50cw==) | `100.00% <100.00%> (ø)` | | | [src/score/peer-score.ts](https://app.codecov.io/gh/ChainSafe/js-libp2p-gossipsub/pull/458?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ChainSafe#diff-c3JjL3Njb3JlL3BlZXItc2NvcmUudHM=) | `85.53% <100.00%> (ø)` | | | [src/stream.ts](https://app.codecov.io/gh/ChainSafe/js-libp2p-gossipsub/pull/458?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ChainSafe#diff-c3JjL3N0cmVhbS50cw==) | `97.46% <100.00%> (ø)` | | | [src/tracer.ts](https://app.codecov.io/gh/ChainSafe/js-libp2p-gossipsub/pull/458?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ChainSafe#diff-c3JjL3RyYWNlci50cw==) | `77.01% <100.00%> (ø)` | | | [src/types.ts](https://app.codecov.io/gh/ChainSafe/js-libp2p-gossipsub/pull/458?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ChainSafe#diff-c3JjL3R5cGVzLnRz) | `94.57% <100.00%> (ø)` | | | [src/utils/buildRawMessage.ts](https://app.codecov.io/gh/ChainSafe/js-libp2p-gossipsub/pull/458?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ChainSafe#diff-c3JjL3V0aWxzL2J1aWxkUmF3TWVzc2FnZS50cw==) | `92.21% <100.00%> (ø)` | | | [src/utils/msgIdFn.ts](https://app.codecov.io/gh/ChainSafe/js-libp2p-gossipsub/pull/458?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ChainSafe#diff-c3JjL3V0aWxzL21zZ0lkRm4udHM=) | `91.66% <100.00%> (ø)` | | | ... and [16 more](https://app.codecov.io/gh/ChainSafe/js-libp2p-gossipsub/pull/458?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ChainSafe) | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.