How to activate a chain fork, so it knows to switch to a different network after the specified fork height?

How to activate a chain fork, so it knows to switch to a different network after the specified fork height?

I've done source forks (altcoins) and I understand how those work. But I'm a little stuck on how forks are activated? I've looked into the Bitcoin Cash and Gold repos on Github and while the former seems to be retaining the Bitcoin ports, at least in the chainparams.cpp, BTC Gold changes that as well. What I'm trying to understand is, how would I allow my client to connect to BTC peers until the fork height and immediately switch to the new network?

If I understand this correctly, Bitcoin Cash seemingly refers to a different set of configurations after the fork, which makes sense, but I can't seem to find how Gold does it and whether there is a better approach?

http://ift.tt/2njCX5S

Comments

Popular posts from this blog

sendrawtransaction and txn-mempool-conflict

couldn't connect to server: EOF reached (code 1)