Skip to content
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

Converting GT/LT uint struct fields to uint pointers #484

Merged
merged 4 commits into from
May 4, 2021
Merged

Converting GT/LT uint struct fields to uint pointers #484

merged 4 commits into from
May 4, 2021

Conversation

barnjamin
Copy link
Contributor

Addresses #144

I wrote no new tests for this, though it probably should have some.

I chose to convert any struct fields that contained GT/LT or GreaterThan/LessThan that were uint64 to *uint64. A 0 value for AlgosLT will never (?) happen in reality but it offended me to leave it out.

I redefined uint64Ptr in one of the test files because exporting it from another one was weird.

@tolikzinovyev tolikzinovyev requested a review from winder May 4, 2021 15:13
@tolikzinovyev
Copy link
Contributor

Thanks, looks good! I will let @winder also take a look.

Copy link
Contributor

@winder winder left a comment

Choose a reason for hiding this comment

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

Awesome, thanks! I was hoping you would update the other parameters while you were at it.

One tip that you might not know, it's really easy to take your branch for a test drive with sandbox. Create a config like the following:

$ cat config.barnjamin
export ALGOD_CHANNEL="nightly"
export ALGOD_URL=""
export ALGOD_BRANCH=""
export ALGOD_SHA=""
export NETWORK=""
export NETWORK_BOOTSTRAP_URL=""
export NETWORK_GENESIS_FILE=""
export INDEXER_URL="https://github.com/barnjamin/indexer"
export INDEXER_BRANCH="convert-zero-to-nil"
export INDEXER_SHA=""
export INDEXER_DISABLED=""
$ ./sandbox up barnjamin

idb/postgres/postgres.go Outdated Show resolved Hide resolved
idb/postgres/postgres.go Outdated Show resolved Hide resolved
idb/postgres/postgres.go Outdated Show resolved Hide resolved
@winder winder merged commit 95fae6e into algorand:develop May 4, 2021
@barnjamin barnjamin deleted the convert-zero-to-nil branch May 4, 2021 20:04
@winder
Copy link
Contributor

winder commented Jun 10, 2021

@barnjamin we have a new reward program, this PR may qualify:
https://gitcoin.co/issue/algorandfoundation/grow-algorand/27/100025836

@barnjamin
Copy link
Contributor Author

oh nice, ill take a look. Thanks!

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.

3 participants