diff --git a/blockchain/thresholdstate.go b/blockchain/thresholdstate.go index 5da74a95..8a79f968 100644 --- a/blockchain/thresholdstate.go +++ b/blockchain/thresholdstate.go @@ -302,6 +302,12 @@ func (b *BlockChain) deploymentState(prevNode *blockNode, deploymentID uint32) ( } deployment := &b.chainParams.Deployments[deploymentID] + + // added to mimic LBRYcrd: + if deployment.ForceActiveAt > 0 && prevNode != nil && prevNode.height+1 >= deployment.ForceActiveAt { + return ThresholdActive, nil + } + checker := deploymentChecker{deployment: deployment, chain: b} cache := &b.deploymentCaches[deploymentID] diff --git a/blockchain/versionbits.go b/blockchain/versionbits.go index 28fcde7b..acdbf144 100644 --- a/blockchain/versionbits.go +++ b/blockchain/versionbits.go @@ -195,6 +195,12 @@ func (b *BlockChain) calcNextBlockVersion(prevNode *blockNode) (int32, error) { expectedVersion := uint32(vbTopBits) for id := 0; id < len(b.chainParams.Deployments); id++ { deployment := &b.chainParams.Deployments[id] + + // added to mimic LBRYcrd: + if deployment.ForceActiveAt > 0 && prevNode != nil && prevNode.height+1 >= deployment.ForceActiveAt { + continue + } + cache := &b.deploymentCaches[id] checker := deploymentChecker{deployment: deployment, chain: b} state, err := b.thresholdState(prevNode, checker, cache) diff --git a/rpcserver.go b/rpcserver.go index d1840729..4502a4cd 100644 --- a/rpcserver.go +++ b/rpcserver.go @@ -1294,6 +1294,7 @@ func handleGetBlockChainInfo(s *rpcServer, cmd interface{}, closeChan <-chan str Bit: deploymentDetails.BitNumber, StartTime2: int64(deploymentDetails.StartTime), Timeout: int64(deploymentDetails.ExpireTime), + Since: deploymentDetails.ForceActiveAt, } }