code: func ConfChange(blockMetadata *etcdraft.BlockMetadata, confState *raftpb.ConfState) *raftpb.ConfChange {
  	raftConfChange := &raftpb.ConfChange{}
  
  	// need to compute conf changes to propose
  	if len(confState.Nodes) < len(blockMetadata.ConsenterIds) {
  		// adding new node
  		raftConfChange.Type = raftpb.ConfChangeAddNode
  		for _, consenterID := range blockMetadata.ConsenterIds {
  			if NodeExists(consenterID, confState.Nodes) {
  				continue
  			}
  			raftConfChange.NodeID = consenterID
  		}
  	} else {
  		// removing node
  		raftConfChange.Type = raftpb.ConfChangeRemoveNode
  		for _, nodeID := range confState.Nodes {
  			if NodeExists(nodeID, blockMetadata.ConsenterIds) {
  				continue
  			}
  			raftConfChange.NodeID = nodeID
  		}
  	}
  
  	return raftConfChange
  }
docs: // ConfChange computes Raft configuration changes based on current Raft
  // configuration state and consenters IDs stored in RaftMetadata.