Skip to content

Conversation

@wit765
Copy link
Contributor

@wit765 wit765 commented Oct 28, 2025

This PR checks error which is returned by the function rlp.Encode().

@wit765 wit765 changed the title all: check error returned freom rlp.Encode all: check error returned from rlp.Encode Oct 28, 2025
@wit765 wit765 force-pushed the rlp-up branch 2 times, most recently from 2be0331 to 7be12f8 Compare October 28, 2025 03:33
@wit765 wit765 changed the title all: check error returned from rlp.Encode all: check error returned from rlp.Encode() Oct 28, 2025

h := sha3.NewLegacyKeccak256()
rlp.Encode(h, cpy.AppendElements(nil))
if err := rlp.Encode(h, cpy.AppendElements(nil)); err != nil {
Copy link
Member

Choose a reason for hiding this comment

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

The RLP encoding will always succeed in this case

@rjl493456442
Copy link
Member

It's acceptable to omit some error checks in the test, or we pretty sure the RLP encoding will succeed.

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.

2 participants