Skip to content

util: replace unnecessary toBytes usage#4014

Merged
jochem-brouwer merged 7 commits into
masterfrom
util/deprecate-toBytes
Apr 24, 2025
Merged

util: replace unnecessary toBytes usage#4014
jochem-brouwer merged 7 commits into
masterfrom
util/deprecate-toBytes

Conversation

@gabrocheleau

Copy link
Copy Markdown
Contributor

This PR refactors some unnecessary toBytes usage.

@codecov

codecov Bot commented Apr 24, 2025

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 83.33333% with 5 lines in your changes missing coverage. Please review.

Project coverage is 79.54%. Comparing base (2908c04) to head (a0a4dec).
Report is 1 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

Flag Coverage Δ
block 84.33% <ø> (ø)
blockchain 89.32% <ø> (ø)
client 67.99% <100.00%> (-0.01%) ⬇️
common 97.51% <ø> (ø)
devp2p 86.78% <ø> (ø)
evm 73.03% <ø> (ø)
mpt 89.74% <100.00%> (+0.03%) ⬆️
statemanager 69.06% <0.00%> (-0.03%) ⬇️
static 99.11% <ø> (ø)
tx 90.59% <100.00%> (ø)
util 89.36% <50.00%> (ø)
vm 55.17% <ø> (ø)

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@gabrocheleau gabrocheleau marked this pull request as ready for review April 24, 2025 02:43

@jochem-brouwer jochem-brouwer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

1 small comment, but LGTM, great cleanup! 😄 🎉 Will approve and merge here

message.push(unpadBytes(toBytes(0)))
message.push(unpadBytes(toBytes(0)))
message.push(unpadBytes(intToBytes(0)))
message.push(unpadBytes(intToBytes(0)))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nit: for these constants can directly use new Uint8Array()

@jochem-brouwer jochem-brouwer merged commit c6deb4e into master Apr 24, 2025
@holgerd77 holgerd77 deleted the util/deprecate-toBytes branch April 24, 2025 09:53
@holgerd77

Copy link
Copy Markdown
Member

Yeah, cool, great start! 👍🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants