Mike Hearn [ARCHIVE] on Nostr: 📅 Original date posted:2011-07-13 🗒️ Summary of this message: BitCoinJ has a ...
📅 Original date posted:2011-07-13
🗒️ Summary of this message: BitCoinJ has a NetworkParameters abstraction that groups constants together, primarily to make unit testing easier, and may be introduced to the Satoshi client.
📝 Original message: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.
🗒️ Summary of this message: BitCoinJ has a NetworkParameters abstraction that groups constants together, primarily to make unit testing easier, and may be introduced to the Satoshi client.
📝 Original message: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.