Conversation
Made it apply to only trivial cases, otherwise too much false positives.
fix: p2p utils
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3369 +/- ##
==========================================
- Coverage 76.25% 76.19% -0.07%
==========================================
Files 351 351
Lines 33340 33365 +25
==========================================
- Hits 25423 25422 -1
- Misses 6103 6131 +28
+ Partials 1814 1812 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
EgeCaner
left a comment
There was a problem hiding this comment.
We can initialize the slices with size and assign by index, but I'm not sure if it worth doing since all those are test code and difference should be negligible.
core/trie/bitarray.go
Outdated
| res = append(res, b.len) | ||
| res = append(res, bt[:]...) | ||
|
|
||
| // 1 byte to accomoaate the length and the other 32 for the data |
There was a problem hiding this comment.
| // 1 byte to accomoaate the length and the other 32 for the data | |
| // 1 byte to accommodate the length and the other 32 for the data |
core/trie/trie_test.go
Outdated
|
|
||
| // put random 64 keys and record roots | ||
| for range 64 { | ||
| const amount = 64 |
There was a problem hiding this comment.
turbo small nit: I'd rename amount to something like numKeys
There were some cases where it was not trivial so I decided to leave it as it is (unless trivial) in the test code. I did change all production code that would benefit from this. |
Fixing linting errors