Open turbolay opened 3 months ago
These are the only two I am aware of for the vSeeds right now:
vSeeds.emplace_back("seed.testnet4.bitcoin.sprovoost.nl."); // Sjors Provoost
vSeeds.emplace_back("seed.testnet4.wiz.biz."); // Jason Maurice
You can verify this here: https://github.com/fjahr/bitcoin/blob/2024-04-testnet-4-fix/src/kernel/chainparams.cpp#L350 and the official PR: https://github.com/bitcoin/bitcoin/pull/29775/files#diff-e20339c384d6f19b519ea2de7f4ba4fed92a36d66a80f0339b09927c3fa38d6dR350
I added a PR to yours, so you can merge in if you want. https://github.com/turbolay/NBitcoin/pull/1
Thanks!! Not sure why I missed that. We will review this PR next week with @lontivero and ping NDorier when we will be sure that it's mergeable
ACK. It connects to the p2p network and interacts with it flawlessly. What else should I test? @NicolasDorier ?
Do not add ChainName.Testnet4
. This is something specific to Bitcoin, while the ChainName
type is not.
You can use a static variable Testnet4ChainName
in the Bitcoin
type, and handle the case in the GetNetwork
.
@lontivero Can you check at last commit please? 9b4a9aa I also made this approach for the PR, not sure which is best as they both look bad.
I don't have context. Why is not okay to have a ChainName for testnet4?
I don't have context. Why is not okay to have a ChainName for testnet4?
@lontivero testnet4 is only for Bitcoin. Other blockchains (Litecoin, Dash etc.) don't have that.
@turbolay do you have any blocker to have progress with this, is it ready to be reviewed? Relevant change is already merged to Bitcoin Core.
@farukterzioglu I think it's OK, even if the solution doesn't look like the best
Please also considerate this alternative, that makes other kind of compromises: https://github.com/turbolay/NBitcoin/commit/abc2aec594d02a15e2e254fec8858002e0c95ab7#diff-12355e5baf374196ed9c5a0708f16632568b4bfc9139c8daff9aca066fd9f8e1
Feel free to request changes, I would apply fast, or take over the PR.
@NicolasDorier, above lontivero confirmed it can connect to the new testnet. And it is refactored as you suggested above. Does the rest look good? Would you have additional comment?
Can you rebase? We moved things around to get everything cleaner
Can you rebase? We moved things around to get everything cleaner
Sorry I am busy lately, thank you for the refactor, it looks good indeed. I will rebase tonight.
Fixes #1216
This PR doesn't replace
TestNet
byTestNet4
, it simply adds toNetwork
andBitcoin
the fieldTestNet4
. Most interesting file to look at is Network.csI also replicated some of the tests we have for
TestNet
toTestNet4
I used @jlopp 's value for network magic.
I however don't know what to use as
vSeeds
:https://github.com/MetacoSA/NBitcoin/blob/828b7d9ffbc6255b06c40cdf7e46d68d6bd04ca9/NBitcoin/Network.cs#L2288-L2295