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

Copy slice when setting block hash list #6734

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

janezpodhostnik
Copy link
Contributor

@janezpodhostnik janezpodhostnik commented Nov 18, 2024

Solves the block hash list issue seen in #6552

The writing to the bucket was done in a way where the original value of the bucket was also changed. Later when we were checking if there are changes, the original bucket and the new bucket were the same so no changes were written.

This requires an HCU

@codecov-commenter
Copy link

codecov-commenter commented Nov 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 41.23%. Comparing base (edf27b0) to head (6834c07).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6734      +/-   ##
==========================================
- Coverage   41.23%   41.23%   -0.01%     
==========================================
  Files        2054     2054              
  Lines      182364   182367       +3     
==========================================
- Hits        75204    75199       -5     
- Misses     100859   100866       +7     
- Partials     6301     6302       +1     
Flag Coverage Δ
unittests 41.23% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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


🚨 Try these New Features:

@janezpodhostnik janezpodhostnik marked this pull request as ready for review November 18, 2024 19:50
Comment on lines +151 to 156
cpy := make([]byte, len(bucket))
copy(cpy, bucket)

if err != nil {
return err
}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
cpy := make([]byte, len(bucket))
copy(cpy, bucket)
if err != nil {
return err
}
if err != nil {
return err
}
cpy := make([]byte, len(bucket))
copy(cpy, bucket)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants