prysm
prysm copied to clipboard
fix: fix slice init length
What type of PR is this?
Bug fix
What does this PR do? Why is it needed?
The intention here should be to initialize a slice with a capacity of 32-len(numBytes) rather than initializing the length of this slice.
The only demo: https://go.dev/play/p/q1BcVCmvidW
Which issues(s) does this PR fix?
Fixes #
Other notes for review
Acknowledgements
- [x] I have read CONTRIBUTING.md.
- [ ] I have made an appropriate entry to CHANGELOG.md.
- [ ] I have added a description to this PR with sufficient context for reviewers to understand this PR.
I think you are mistaken. The desired behavior is to pad the slice with zeros, not just allocating a capacity on the slice.