-
Notifications
You must be signed in to change notification settings - Fork 197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
clean(rpc): refactor & remove unused code #2639
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2639 +/- ##
==========================================
- Coverage 75.20% 75.09% -0.12%
==========================================
Files 140 140
Lines 16815 16786 -29
==========================================
- Hits 12646 12605 -41
- Misses 3340 3349 +9
- Partials 829 832 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see is still a draft and has the small issues we have discussed recently of the use of T
vs *T
. I'll let you fix them. I now this is a refactor but I am ok with extend this function to remove these when straightforward
rpc/v6/adapters.go
Outdated
@@ -339,3 +345,392 @@ func adaptFeederExecutionResources(resources *starknet.ExecutionResources) Compu | |||
SegmentArena: builtins.SegmentArena, | |||
} | |||
} | |||
|
|||
func adaptToFeederResourceBounds(rb *map[Resource]ResourceBounds) *map[starknet.Resource]starknet.ResourceBounds { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need for pointers, either as input or output parameters. map[K]V
is already a pointer by default
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yeah, I just moved those functions from the other file to this file.
Yeah for sure, I'll make the changes to all functions needing it in this PR!
rpc/v6/adapters.go
Outdated
return &feederResourceBounds | ||
} | ||
|
||
func adaptToFeederDAMode(mode *DataAvailabilityMode) *starknet.DataAvailabilityMode { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Return value type here.
This approach looks good to me |
…ue instead of pointers when possible
…ue instead of pointers when possible
a PR to clean / reorganize a bit