Skip to content

Conversation

@domob1812
Copy link
Contributor

Clean up the code in chainparams a bit more after the recent refactorings. In particular, make sure the structure of the "RegTest" params matches the structure of the other classes. This makes the code clearer to read.

Also remove redundant values of the genesis block in always-specified optional arguments and mark variable/argument as "const".

@sipa
Copy link
Member

sipa commented Jul 24, 2015

No strong opinion, but looks good to me.

@jonasschnelli
Copy link
Contributor

ACK (makes sense to remove duplicated parameter default values and the const pass by ref).

@laanwj
Copy link
Member

laanwj commented Jul 27, 2015

I'd prefer to take this one step further: remove the default arguments from the outer CreateGenesisBlock as well. And specify all the parameters where they belong, together, in the appropriate constructor.

@domob1812 domob1812 force-pushed the cleanup-chainparams branch from 8b4eeb2 to 032e8e5 Compare July 28, 2015 13:55
@domob1812
Copy link
Contributor Author

I agree - I've updated the patch. When it is finally reviewed and ready, I will squash the commits.

@laanwj
Copy link
Member

laanwj commented Jul 28, 2015

utACK
Looks much better like this.

@theuni
Copy link
Member

theuni commented Jul 28, 2015

ut ACK. Agreed that the defaults there are strange.

@laanwj
Copy link
Member

laanwj commented Jul 29, 2015

@domob1812 can you squash please?

@domob1812 domob1812 force-pushed the cleanup-chainparams branch from 74e9f79 to 5fb5c9b Compare July 29, 2015 19:12
@domob1812
Copy link
Contributor Author

Done.

Clean up the code in chainparams a bit more after the recent
refactorings.  In particular, make sure the structure of the "RegTest"
params matches the structure of the other classes.  This makes the code
clearer to read.

Also remove redundant values of the genesis block in always-specified
optional arguments and mark variable/argument as "const".
@laanwj laanwj merged commit 5fb5c9b into bitcoin:master Jul 31, 2015
laanwj added a commit that referenced this pull request Jul 31, 2015
5fb5c9b Clean up chainparams some more. (Daniel Kraft)
@domob1812 domob1812 deleted the cleanup-chainparams branch July 31, 2015 08:21
zkbot added a commit to zcash/zcash that referenced this pull request Jan 19, 2018
Bitcoin 0.12 chainparams cleanups

Cherry-picked from the following upstream PRs:

- bitcoin/bitcoin#6222
- bitcoin/bitcoin#6381
- bitcoin/bitcoin#6473
- bitcoin/bitcoin#6242

Part of #2074.
zkbot added a commit to zcash/zcash that referenced this pull request Jan 22, 2018
Bitcoin 0.12 chainparams cleanups

Cherry-picked from the following upstream PRs:

- bitcoin/bitcoin#6222
- bitcoin/bitcoin#6381
- bitcoin/bitcoin#6473
- bitcoin/bitcoin#6242

Part of #2074.
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants