From b10aea8f3d6df8eb751edebd99d89ffe43e01896 Mon Sep 17 00:00:00 2001 From: Mark Tyneway Date: Thu, 24 Jan 2019 20:46:49 -0800 Subject: [PATCH] bugfix: regtest segwit start time 0 The deployments are written to and read from a database and the start time is a U32. Changing the value to -1 will cause the value to be read incorrectly and cause the tests to fail. --- lib/blockchain/chain.js | 3 --- lib/protocol/networks.js | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/blockchain/chain.js b/lib/blockchain/chain.js index 2c44b11d..51329083 100644 --- a/lib/blockchain/chain.js +++ b/lib/blockchain/chain.js @@ -2389,9 +2389,6 @@ 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 0d440054..1072a1ad 100644 --- a/lib/protocol/networks.js +++ b/lib/protocol/networks.js @@ -801,7 +801,7 @@ regtest.deployments = { segwit: { name: 'segwit', bit: 1, - startTime: -1, + startTime: 0, timeout: 0xffffffff, threshold: -1, window: -1,