leonardocustodio / polkadart

Polkadart provides developers the ability to query a node and interact with the Polkadot based chains using Dart.
https://polkadart.dev
Apache License 2.0
39 stars 16 forks source link

Fixes xxh64 algorithm #375

Closed leonardocustodio closed 1 year ago

leonardocustodio commented 1 year ago

@clangenb this should fix #373 , would you mind to give a shot before I merge it? I will fix and add the tests later.

leonardocustodio commented 1 year ago

Done, added the tests, it seems to be working fine.

codecov[bot] commented 1 year ago

Codecov Report

Merging #375 (cdde76b) into main (0295b13) will increase coverage by 0.01%. The diff coverage is 45.24%.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/leonardocustodio/polkadart/pull/375/graphs/tree.svg?width=650&height=150&src=pr&token=HG3K4LW5UN&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Leonardo+Custodio)](https://app.codecov.io/gh/leonardocustodio/polkadart/pull/375?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Leonardo+Custodio) ```diff @@ Coverage Diff @@ ## main #375 +/- ## ========================================== + Coverage 44.84% 44.85% +0.01% ========================================== Files 142 146 +4 Lines 8206 8233 +27 ========================================== + Hits 3680 3693 +13 - Misses 4526 4540 +14 ``` | [Flag](https://app.codecov.io/gh/leonardocustodio/polkadart/pull/375/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Leonardo+Custodio) | Coverage Δ | | |---|---|---| | [polkadart](https://app.codecov.io/gh/leonardocustodio/polkadart/pull/375/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Leonardo+Custodio) | `17.43% <45.45%> (+0.68%)` | :arrow_up: | | [polkadart_cli](https://app.codecov.io/gh/leonardocustodio/polkadart/pull/375/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Leonardo+Custodio) | `12.27% <0.00%> (ø)` | | | [polkadart_keyring](https://app.codecov.io/gh/leonardocustodio/polkadart/pull/375/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Leonardo+Custodio) | `94.25% <ø> (ø)` | | | [polkadart_scale_codec](https://app.codecov.io/gh/leonardocustodio/polkadart/pull/375/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Leonardo+Custodio) | `54.93% <ø> (ø)` | | | [ss58](https://app.codecov.io/gh/leonardocustodio/polkadart/pull/375/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Leonardo+Custodio) | `96.87% <ø> (ø)` | | | [substrate_bip39](https://app.codecov.io/gh/leonardocustodio/polkadart/pull/375/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Leonardo+Custodio) | `64.34% <ø> (ø)` | | | [substrate_metadata](https://app.codecov.io/gh/leonardocustodio/polkadart/pull/375/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Leonardo+Custodio) | `87.61% <ø> (ø)` | | 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=Leonardo+Custodio#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files](https://app.codecov.io/gh/leonardocustodio/polkadart/pull/375?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Leonardo+Custodio) | Coverage Δ | | |---|---|---| | [packages/polkadart/lib/substrate/hasher.dart](https://app.codecov.io/gh/leonardocustodio/polkadart/pull/375?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Leonardo+Custodio#diff-cGFja2FnZXMvcG9sa2FkYXJ0L2xpYi9zdWJzdHJhdGUvaGFzaGVyLmRhcnQ=) | `86.36% <100.00%> (+1.36%)` | :arrow_up: | | [...ages/polkadart\_cli/lib/src/typegen/types/core.dart](https://app.codecov.io/gh/leonardocustodio/polkadart/pull/375?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Leonardo+Custodio#diff-cGFja2FnZXMvcG9sa2FkYXJ0X2NsaS9saWIvc3JjL3R5cGVnZW4vdHlwZXMvY29yZS5kYXJ0) | `24.20% <0.00%> (ø)` | | | [packages/polkadart/lib/substrate/hash/xxh64.dart](https://app.codecov.io/gh/leonardocustodio/polkadart/pull/375?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Leonardo+Custodio#diff-cGFja2FnZXMvcG9sa2FkYXJ0L2xpYi9zdWJzdHJhdGUvaGFzaC94eGg2NC5kYXJ0) | `91.30% <91.30%> (ø)` | | | [packages/polkadart/lib/substrate/xxh64.dart](https://app.codecov.io/gh/leonardocustodio/polkadart/pull/375?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Leonardo+Custodio#diff-cGFja2FnZXMvcG9sa2FkYXJ0L2xpYi9zdWJzdHJhdGUveHhoNjQuZGFydA==) | `25.00% <25.00%> (-18.92%)` | :arrow_down: | | [...kages/polkadart/lib/substrate/hash/block\_hash.dart](https://app.codecov.io/gh/leonardocustodio/polkadart/pull/375?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Leonardo+Custodio#diff-cGFja2FnZXMvcG9sa2FkYXJ0L2xpYi9zdWJzdHJhdGUvaGFzaC9ibG9ja19oYXNoLmRhcnQ=) | `47.61% <47.61%> (ø)` | | | [...ages/polkadart/lib/substrate/hash/hash\_digest.dart](https://app.codecov.io/gh/leonardocustodio/polkadart/pull/375?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Leonardo+Custodio#diff-cGFja2FnZXMvcG9sa2FkYXJ0L2xpYi9zdWJzdHJhdGUvaGFzaC9oYXNoX2RpZ2VzdC5kYXJ0) | `8.33% <8.33%> (ø)` | | | [...ckages/polkadart/lib/substrate/hash/hash\_base.dart](https://app.codecov.io/gh/leonardocustodio/polkadart/pull/375?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Leonardo+Custodio#diff-cGFja2FnZXMvcG9sa2FkYXJ0L2xpYi9zdWJzdHJhdGUvaGFzaC9oYXNoX2Jhc2UuZGFydA==) | `9.09% <9.09%> (ø)` | |
justkawal commented 1 year ago

@leonardocustodio Genius aye... 💯

clangenb commented 1 year ago

Very impressive that you have fixed it this fast.