RGB-WG / rgb-std

RGB standard libs for WASM & low-level integrations (no FS/networking)
https://rgb.tech
Apache License 2.0
66 stars 31 forks source link

Check attach #225

Closed cymqqqq closed 1 week ago

cymqqqq commented 2 months ago

Description: check attached ids from data containers are present in the consignment.

  1. iter bundle ids from index consignment
  2. index transition bundle by bundle id
  3. for each transition bundle, get all transitions
  4. for each transition, get all assignments, and then get the revealed attach state by as_attachment()
  5. finally, check attached id from the consignment is equal to attached id from the reveal attach state(also, from the operation transition attach state).

I'm not sure if the logic I implemented is correct.

codecov[bot] commented 2 months ago

Codecov Report

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

Project coverage is 16.8%. Comparing base (1c5b910) to head (86ff555). Report is 2 commits behind head on master.

:exclamation: Current head 86ff555 differs from pull request most recent head 1c8ae7c

Please upload reports for the commit 1c8ae7c to get more accurate results.

Files Patch % Lines
src/containers/consignment.rs 0.0% 25 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #225 +/- ## ======================================== - Coverage 17.0% 16.8% -0.2% ======================================== Files 37 37 Lines 7379 7476 +97 ======================================== Hits 1257 1257 - Misses 6122 6219 +97 ``` | [Flag](https://app.codecov.io/gh/RGB-WG/rgb-std/pull/225/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=RGB-WG) | Coverage Δ | | |---|---|---| | [rust](https://app.codecov.io/gh/RGB-WG/rgb-std/pull/225/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=RGB-WG) | `16.8% <0.0%> (-0.2%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=RGB-WG#carryforward-flags-in-the-pull-request-comment) to find out more.

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

cymqqqq commented 2 months ago

I will close this pr, because I have no good idea for check attach now.