WIP: Feature/6/jeffreypicard/dockerize for deployment #7

Closed
jeffreypicard wants to merge 80 commits from feature/6/jeffreypicard/dockerize-for-deployment into master
3 changed files with 13 additions and 0 deletions
Showing only changes of commit 059aa2ef4f - Show all commits

View file

@ -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]

View file

@ -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)

View file

@ -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,
}
}