Conversation
That should reduce code duplication.
There are no any reasons to support two separate build systems (Makefile and go generate). This patch moves "go:generate" directives into Makefile.
There was a problem hiding this comment.
Pull Request Overview
This pull request refactors fee handling by replacing separate fee fields (FeeCredit, MaxPriorityFeePerGas, and MaxFeePerGas) with a unified FeePack structure and removes obsolete go:generate directives.
- Reduces code duplication by reusing the FeePack structure in transaction types and related functions.
- Replaces multiple go:generate directives with Makefile usage for building and future-proofing the encoding system.
Reviewed Changes
Copilot reviewed 27 out of 28 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| nil/services/rpc/types/types.go | Updated transaction creation to use FeePack instead of individual fee fields. |
| nil/services/rpc/jsonrpc/types.go | Embedded FeePack in Transaction and updated conversion in NewTransaction. |
| nil/services/rpc/txpool_api_test.go | Updated test transactions to use FeePack initialization. |
| nil/services/faucet/jsonrpc.go | Replaced fee fields with FeePack creation via NewFeePackFromGas. |
| nil/internal/types/transaction.go | Refactored TransactionDigest and related conversions to use FeePack. |
| *Other files (version_info.go, signature.go, receipt.go, log.go, exec_errors.go, collator.go, block.go, account.go, etc.) | Removed redundant go:generate directives and updated fee pack usage accordingly. |
Files not reviewed (1)
- nil/internal/types/Makefile.inc: Language not supported
shermike
approved these changes
Apr 28, 2025
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This patch set contains two improvements: