Skip to content

Commit 99324eb

Browse files
committed
OP_CHECKTEMPLATEVERIFY: Special case deployment parameters for CTV signet
1 parent 00b5aa6 commit 99324eb

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/chainparams.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,7 @@ class SigNetParams : public CChainParams {
308308
std::vector<uint8_t> bin;
309309
vSeeds.clear();
310310

311+
bool is_special_ctv_signet = false;
311312
if (!args.IsArgSet("-signetchallenge")) {
312313
bin = ParseHex("512103ad5e0edad18cb1f0fc0d28a3d4f1f3e445640337489abb10404f2d1e086be430210359ef5021964fe22d6f8e05b2463c9540ce96883fe3b278760f048f5189f2e6c452ae");
313314
vSeeds.emplace_back("seed.signet.bitcoin.sprovoost.nl.");
@@ -331,6 +332,9 @@ class SigNetParams : public CChainParams {
331332
if (signet_challenge.size() != 1) {
332333
throw std::runtime_error(strprintf("%s: -signetchallenge cannot be multiple values.", __func__));
333334
}
335+
if (signet_challenge[0] == "512102946e8ba8eca597194e7ed90377d9bbebc5d17a9609ab3e35e706612ee882759351ae") {
336+
is_special_ctv_signet = true;
337+
}
334338
bin = ParseHex(signet_challenge[0]);
335339

336340
consensus.nMinimumChainWork = uint256{};
@@ -376,6 +380,15 @@ class SigNetParams : public CChainParams {
376380
.start = 1654041600, // 2022-06-01
377381
.timeout = 1969660800, // 2032-06-01
378382
};
383+
if (is_special_ctv_signet) {
384+
// custom deployment parameters for compat
385+
consensus.vDeployments[Consensus::DEPLOYMENT_CHECKTEMPLATEVERIFY] = SetupDeployment{
386+
.start = 1608242730, // 2020-12-18 (first block on ctv signet)
387+
.timeout = 1969660800, // 2032-06-01
388+
.activate = 0x20000000, // default version signals for activation
389+
.abandon = 0, // consensus invalid due to BIP34
390+
};
391+
}
379392
RenounceDeployments(args, consensus.vDeployments);
380393

381394
// message start is defined as the first 4 bytes of the sha256d of the block script

0 commit comments

Comments
 (0)