nspcc-dev / neofs-node

NeoFS is a decentralized distributed object storage integrated with the Neo blockchain
https://fs.neo.org
GNU General Public License v3.0
32 stars 38 forks source link

node/tombstones: Protect first objects from removal #2839

Closed carpawell closed 5 months ago

carpawell commented 5 months ago

First objects do not have first field set, so searching with empty ID is a no-op which means no LINK will ever be found => dropping a first object is allowed.

carpawell commented 5 months ago

Added tests.

codecov[bot] commented 5 months ago

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 23.15%. Comparing base (df262cc) to head (d5d307a).

:exclamation: Current head d5d307a differs from pull request most recent head 67e6e72. Consider uploading reports for the commit 67e6e72 to get more accurate results

Files Patch % Lines
pkg/services/object/tombstone/verify.go 0.00% 1 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2839 +/- ## ========================================== - Coverage 29.73% 23.15% -6.58% ========================================== Files 442 798 +356 Lines 34493 47461 +12968 ========================================== + Hits 10257 10991 +734 - Misses 23346 35553 +12207 - Partials 890 917 +27 ```

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