diff options
| author | Suhas Daftuar <[email protected]> | 2016-07-25 17:22:37 -0400 |
|---|---|---|
| committer | Suhas Daftuar <[email protected]> | 2016-07-29 09:41:58 -0400 |
| commit | 56c87e92110f05d7452f1e85bf755246ffc77206 (patch) | |
| tree | 8428199ed927d530d034610071f7551940e5b366 /src/chainparams.cpp | |
| parent | Merge #8274: util: Update tinyformat (diff) | |
| download | discoin-56c87e92110f05d7452f1e85bf755246ffc77206.tar.xz discoin-56c87e92110f05d7452f1e85bf755246ffc77206.zip | |
Allow changing BIP9 parameters on regtest
Diffstat (limited to 'src/chainparams.cpp')
| -rw-r--r-- | src/chainparams.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/chainparams.cpp b/src/chainparams.cpp index 86bef1e10..d6032440e 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -303,6 +303,12 @@ public: base58Prefixes[EXT_PUBLIC_KEY] = boost::assign::list_of(0x04)(0x35)(0x87)(0xCF).convert_to_container<std::vector<unsigned char> >(); base58Prefixes[EXT_SECRET_KEY] = boost::assign::list_of(0x04)(0x35)(0x83)(0x94).convert_to_container<std::vector<unsigned char> >(); } + + void UpdateBIP9Parameters(Consensus::DeploymentPos d, int64_t nStartTime, int64_t nTimeout) + { + consensus.vDeployments[d].nStartTime = nStartTime; + consensus.vDeployments[d].nTimeout = nTimeout; + } }; static CRegTestParams regTestParams; @@ -330,4 +336,9 @@ void SelectParams(const std::string& network) SelectBaseParams(network); pCurrentParams = &Params(network); } + +void UpdateRegtestBIP9Parameters(Consensus::DeploymentPos d, int64_t nStartTime, int64_t nTimeout) +{ + regTestParams.UpdateBIP9Parameters(d, nStartTime, nTimeout); +} |