This repository was archived by the owner on Feb 17, 2025. It is now read-only.
Conversation
agnusmor
reviewed
Nov 17, 2023
| if poolTx.Size() > p.cfg.MaxTxBytesSize { | ||
| decodedTx, err := state.EncodeTransaction(poolTx.Transaction, 0xFF, p.cfg.ForkID) //nolint: gomnd | ||
| if err != nil { | ||
| return ErrTxTypeNotSupported |
Contributor
There was a problem hiding this comment.
isn't it better to return err?
Contributor
Author
There was a problem hiding this comment.
This error es returned to the user by the RPC, it should be a standard error if possible.
| Cost: tx.Cost(), | ||
| BatchResources: state.BatchResources{ | ||
| Bytes: tx.Size(), | ||
| Bytes: uint64(len(rawTx)) + state.EfficiencyPercentageByteLength, |
Contributor
There was a problem hiding this comment.
maybe we need to use state.EncodeTransaction to get the rawTx and pass the forkid to the txTracker, to be coherent
agnusmor
approved these changes
Nov 20, 2023
ToniRamirezM
added a commit
that referenced
this pull request
Nov 20, 2023
* fix tx size check * fix tx size check * refactor * fix test * fix test * fix
ToniRamirezM
added a commit
that referenced
this pull request
Nov 20, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #2798
What does this PR do?
Change the way the tx size is checked
Reviewers
Main reviewers: