Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regtest #8

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Regtest #8

wants to merge 2 commits into from

Conversation

lvaccaro
Copy link
Contributor

@lvaccaro lvaccaro commented Oct 5, 2017

Add support to RegTest network.

  • Preprocessor macro BITCOIN_REGTEST: to discriminate regtest code.
  • Add BITCOIN_REGTEST=1 in "Preprocessor macro" in order to compile.
  • Define your own dns_seeds in BRPeerManager.c.
  • Define your port STANDARD_PORT in BRPeer.h
  • Add regtest macro:
#define BITCOIN_PUBKEY_ADDRESS_REGTEST 111
#define BITCOIN_SCRIPT_ADDRESS_REGTEST 196
#define BITCOIN_PRIVKEY_REGTEST        239
#define BIP32_XPRV     "\x04\x35\x83\x94"
#define BIP32_XPUB     "\x04\x35\x87\xCF"
#define MAX_PROOF_OF_WORK 0x207fffff
#define MAGIC_NUMBER 0xdab5bffa
#define STANDARD_PORT 18444

static const struct { uint32_t height; const char *hash; uint32_t timestamp; uint32_t target; } checkpoint_array[] = {
    {      0, "0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206", 1296688602, 0x207fffff }
    };

static const char *dns_seeds[] = {
    "example.com"
   };

@voisine
Copy link
Member

voisine commented Jan 29, 2018

Hi @lvaccaro, I've refactored brpeermanager to now accept a chainparams argument. Do you think you could update your PR to use it? It should make it simpler.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants