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.javaIt 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.
Published at
2023-06-07 02:05:00Event JSON
{
"id": "09722821879186c1fbc767880780019b94a479a081f2a320a98df1f90a756c9d",
"pubkey": "f2c95df3766562e3b96b79a0254881c59e8639f23987846961cf55412a77f6f2",
"created_at": 1686103500,
"kind": 1,
"tags": [
[
"e",
"4eaf1439aa67825cabdea581be3956c38ea4a62226b60d5367bace64dca7945b",
"",
"root"
],
[
"e",
"613b68b37b683f9db7748418f7f693f3f733d2117d11babdab07b41eb264fd1d",
"",
"reply"
],
[
"p",
"cd753aa8fbc112e14ffe9fe09d3630f0eff76ca68e376e004b8e77b687adddba"
]
],
"content": "📅 Original date posted:2011-07-13\n🗒️ 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.\n📝 Original message:For what it's worth, BitCoinJ has a NetworkParameters abstraction that\ndoes what you suggest (groups all the constants together):\n\n http://code.google.com/p/bitcoinj/source/browse/trunk/src/com/google/bitcoin/core/NetworkParameters.java\n\nIt exists primarily to make unit testing easier. In the test suite, we\noften build small chains and other structures. We do this by using a\nNetworkParameters that has the easiest difficulty possible. It means\nyou can solve blocks in a few attempts, easily fast enough to build\ntest chains of any length you like.\n\nI suspect that as the test suite expands, a similar abstraction will\nbe introduced to the Satoshi client.",
"sig": "c0832841134c1523936a6ca9e629a5e56486f0edf1f79d21db3d3fbd7a7a1519ed4cfe34fcde0b59e6be2ad92c79ba094125d3637559baab3afd513c8e3034a4"
}