[Bitcoin-development] overall bitcoin client code quality

Mike Hearn mike at plan99.net
Wed Jul 13 11:50:38 UTC 2011


For what it's worth, BitCoinJ has a NetworkParameters abstraction that
does what you suggest (groups all the constants together):

  http://code.google.com/p/bitcoinj/source/browse/trunk/src/com/google/bitcoin/core/NetworkParameters.java

It exists primarily to make unit testing easier. In the test suite, we
often build small chains and other structures. We do this by using a
NetworkParameters that has the easiest difficulty possible. It means
you can solve blocks in a few attempts, easily fast enough to build
test chains of any length you like.

I suspect that as the test suite expands, a similar abstraction will
be introduced to the Satoshi client.




More information about the bitcoin-dev mailing list