From 53a09b0a028cf43160f00e33c516bb926a411e2b Mon Sep 17 00:00:00 2001 From: Javed Khan Date: Mon, 22 Oct 2018 20:05:32 +0530 Subject: [PATCH] networks: always activate segwit for regtest --- lib/blockchain/chain.js | 3 +++ lib/protocol/networks.js | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/blockchain/chain.js b/lib/blockchain/chain.js index 51329083..2c44b11d 100644 --- a/lib/blockchain/chain.js +++ b/lib/blockchain/chain.js @@ -2389,6 +2389,9 @@ class Chain extends AsyncEmitter { async getState(prev, deployment) { const bit = deployment.bit; + if (deployment.startTime === -1) + return thresholdStates.ACTIVE; + let window = this.network.minerWindow; let threshold = this.network.activationThreshold; diff --git a/lib/protocol/networks.js b/lib/protocol/networks.js index 3190d005..45c210d6 100644 --- a/lib/protocol/networks.js +++ b/lib/protocol/networks.js @@ -801,7 +801,7 @@ regtest.deployments = { segwit: { name: 'segwit', bit: 1, - startTime: 0, + startTime: -1, timeout: 0xffffffff, threshold: -1, window: -1,