Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

*: Convert slices to arrays instead of copy where possible #3505

Merged
merged 1 commit into from
Jul 8, 2024

Conversation

cthulhu-rider
Copy link
Contributor

neo-go/pkg/core/blockchain.go

Lines 1185 to 1186 in 5566e35

var batchAcc util.Uint160
copy(batchAcc[:], k[1:])
also looks like a candidate, but (un)fortunately the slice len is not checked, so the conversion cannot be used

Copy link

codecov bot commented Jul 5, 2024

Codecov Report

Attention: Patch coverage is 75.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 86.11%. Comparing base (5566e35) to head (c975d72).
Report is 2 commits behind head on master.

Files Patch % Lines
pkg/core/interop/runtime/util.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3505   +/-   ##
=======================================
  Coverage   86.11%   86.11%           
=======================================
  Files         331      331           
  Lines       38564    38562    -2     
=======================================
- Hits        33209    33208    -1     
- Misses       3825     3826    +1     
+ Partials     1530     1528    -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@AnnaShaleva AnnaShaleva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise LGTM.

pkg/core/interop/context.go Outdated Show resolved Hide resolved
Became possible with Go 1.20.

Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
@AnnaShaleva AnnaShaleva merged commit 7304b2c into master Jul 8, 2024
20 of 21 checks passed
@AnnaShaleva AnnaShaleva deleted the array-cp branch July 8, 2024 08:00
@AnnaShaleva AnnaShaleva added this to the v0.106.3 milestone Jul 12, 2024
@AnnaShaleva AnnaShaleva added U4 Nothing urgent enhancement Improving existing functionality S4 Routine I4 No visible changes labels Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improving existing functionality I4 No visible changes S4 Routine U4 Nothing urgent
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants