aleph-im / pyaleph

Next generation network of decentralized big data applications. Current connected chains: Ethereum, Solana, Polkadot/Substrate, Cosmos-SDK, NULS.
https://aleph.im
MIT License
75 stars 19 forks source link

Fix: check if requirements exist on message #591

Closed 1yam closed 1 month ago

1yam commented 1 month ago

Problem: In some case (hold instance) there is no requirements field

Solutions: Add check if requirements field exist

Psycojoker commented 1 month ago

If possible, add a test on it

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 94.37%. Comparing base (9cb1456) to head (0441673). Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #591 +/- ## ======================================= Coverage 94.37% 94.37% ======================================= Files 91 91 Lines 4909 4910 +1 Branches 677 677 ======================================= + Hits 4633 4634 +1 Misses 241 241 Partials 35 35 ```

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

1yam commented 1 month ago

We already have a test that covers instance message processing without specific requirements, which is test_process_instance. You can find it here.

I have added a check for the node_hash field to ensure it aligns with the configuration of the instance. As the confidential one do