-
Notifications
You must be signed in to change notification settings - Fork 33
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
Ticket #211: finding unnecessary public functions in the Persistence Module #320
Ticket #211: finding unnecessary public functions in the Persistence Module #320
Conversation
@Jasonyou1995 I noticed that you change the function names but not any place where it's being called. Did the unit tests pass after making this change? |
Working on setting up local nodes and test environments. Will review the comments today! |
Keep this function
DeleteApp function removed.
The GetParameteres need to be implemented.
There is no public function needed to be changed to private. The |
@Jasonyou1995 Could you confirm how you validated that there are no public functions that need to be converted to private? Either describing the process or a script you used would help. I did a quick search for a function called |
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.
There is more work remaining here: #320 (comment)
One question I have is about updating the branch. I see some new commits made after I created this branch, but I'm unsure how to keep up to date with the main branch. Does |
Try Highly recommend going through a git fundamentals tutorial online too: https://www.atlassian.com/git |
Thanks! That helps, and I will go through that tutorial. |
[Functions with zero usage outside ./pocket/persistence/] Here is a list of functions without usage outside the |
That looks like a great list and very appropriate! Let's go forward with it. Few things:
|
Here is the error I got for all the functions I tried to rename with the F2 feature (on another laptop). I spent a few hours looking into solutions but had no luck... If you know what's the cause pls let me know. (I didn't want to just use the find and replace method, cause that can be unsafe for future code base). |
@Jasonyou1995 Firstly, feel free to use w/e IDE you'd like: VSCode, Goland, etc... All modern IDEs (i.e. not vim, emacs, etc...) have good symbol renaming features, and you can usually trust. If you look at |
persistence/docs/CHANGELOG.md
Outdated
## [Unreleased] | ||
|
||
## [0.0.0.9] - 2022-11-04 |
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.
Update the date prior to commit
@Jasonyou1995 Note how this has conflicts with master. This is very much expected as the rest of the team continues to merge in changes. Simply merge with master and resolve the conflicts. I'd wait until #337 is in since it's very close. Once it is, make sure to re-run all the tests and LocalNet to make sure we keep main stable before merging it in. We can probably get this in by EOD tomorrow! |
Sounds great to me! I will update the conflict parts once #337 is in. Hopefully this will be merged by tomorrow! |
rpc/client.gen.go
Outdated
@@ -0,0 +1,546 @@ | |||
// Package rpc provides primitives to interact with the openapi HTTP API. |
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.
@Jasonyou1995 Should these files be introduced?
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.
These files are not necessary, I didn't know why they showed up.
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.
Updated the suggested changes
Co-authored-by: Daniel Olshansky <olshansky@pokt.network>
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.
@Jasonyou1995 I noticed you did not re-request a review but aside from one small point, the PR is close to be ready.
Please double-check that all the tests & local net are passing after merging with master and request a review then.
…Module (#320) Reducing the scope of public functions in the persistence package from public to private for readability purposes
Description
Reducing the scope of public functions in the persistence package from public to private for readability purposes
Issue
Fixes #211
Type of change
Please mark the relevant option(s):
List of changes
Changed the following exported functions to lowercase non-exported functions
[./pocket/persistence/]
GetActor
GetActorFromRow
GetChainsForActor
SetActorStakeAmount
GetActorStakeAmount
GetCtxAndTx
GetCtx
SetValidatorStakedTokens
GetValidatorStakedTokens
[./pocket/persistence/types]
ProtocolActorTableSchema
ProtocolActorChainsTableSchema
SelectChains
ReadyToUnstake
InsertChains
UpdateUnstakingHeight
UpdateStakeAmount
UpdatePausedHeight
UpdateUnstakedHeightIfPausedBefore
AccToAccInterface
TestInsertParams
AccountOrPoolSchema
InsertAcc
SelectBalance
[./pocket/persistence/test]
GetGenericActor
NewTestGenericActor
Testing
make develop_test
README
Required Checklist
If Applicable Checklist
shared/docs/*
if I updatedshared/*
README(s)