code: func (b *BlockChain) deploymentState(prevNode *blockNode, deploymentID uint32) (ThresholdState, error) {
  	if deploymentID > uint32(len(b.chainParams.Deployments)) {
  		return ThresholdFailed, DeploymentError(deploymentID)
  	}
  
  	deployment := &b.chainParams.Deployments[deploymentID]
  	checker := deploymentChecker{deployment: deployment, chain: b}
  	cache := &b.deploymentCaches[deploymentID]
  
  	return b.thresholdState(prevNode, checker, cache)
  }
docs: // deploymentState returns the current rule change threshold for a given
  // deploymentID. The threshold is evaluated from the point of view of the block
  // node passed in as the first argument to this method.
  //
  // It is important to note that, as the variable name indicates, this function
  // expects the block node prior to the block for which the deployment state is
  // desired.  In other words, the returned deployment state is for the block
  // AFTER the passed node.
  //
  // This function MUST be called with the chain state lock held (for writes).