code: function readBestChildrenProps(conn, arrUnits, handleResult){
  	if (arrUnits.every(function(unit){ return !!storage.assocUnstableUnits[unit]; })){
  		var arrProps = [];
  		arrUnits.forEach(function(unit){
  			if (storage.assocBestChildren[unit])
  				arrProps = arrProps.concat(storage.assocBestChildren[unit]);
  		});
  		return handleResult(arrProps);
  	}
  	conn.query("SELECT unit, is_on_main_chain, main_chain_index, level, is_free FROM units WHERE best_parent_unit IN(?)", [arrUnits], function(rows){
  		if (arrUnits.every(function(unit){ return !!storage.assocUnstableUnits[unit]; })){
  			var arrProps = [];
  			arrUnits.forEach(function(unit){
  				if (storage.assocBestChildren[unit])
  					arrProps = arrProps.concat(storage.assocBestChildren[unit]);
  			});
  			if (!arraysEqual(_.sortBy(rows, 'unit'), _.sortBy(arrProps, 'unit'), ['unit', 'is_on_main_chain', 'main_chain_index', 'level', 'is_free']))
  				throwError("different best children of "+arrUnits.join(', ')+": db "+JSON.stringify(rows)+", mem "+JSON.stringify(arrProps));
  		}
  		handleResult(rows);
  	});
  }
docs: /*
  
  climbs up along best parent links up, returns list of units encountered with level >= min_level
  function createListOfPrivateMcUnits(start_unit, min_level, handleList){
  var arrUnits = [];
  
  function goUp(unit){
  conn.query(
  "SELECT best_parent_unit, level FROM units WHERE unit=?", [unit],
  function(rows){
  if (rows.length !== 1)
  throw "createListOfPrivateMcUnits: not 1 row";
  var row = rows[0];
  if (row.level < min_level)
  return handleList(arrUnits);
  arrUnits.push(unit);
  goUp(row.best_parent_unit);
  }
  );
  }
  
  goUp(start_unit);
  }