storage.js
function buildListOfMcUnitsWithPotentiallyDifferentWitnesslists(conn, objUnit, last_ball_unit, arrWitnesses, handleList){

	function addAndGoUp(unit){
		readStaticUnitProps(conn, unit, function(props){
			// the parent has the same witness list and the parent has already passed the MC compatibility test
			if (objUnit.witness_list_unit && objUnit.witness_list_unit === props.witness_list_unit)
				return handleList(true, arrMcUnits);
			else
				arrMcUnits.push(unit);
			if (unit === last_ball_unit)
				return handleList(true, arrMcUnits);
			if (!props.best_parent_unit)
				throw Error("no best parent of unit "+unit+"?");
			addAndGoUp(props.best_parent_unit);
		});
	}

	var arrMcUnits = [];
	determineBestParent(conn, objUnit, arrWitnesses, function(best_parent_unit){
		if (!best_parent_unit)
			return handleList(false);
		addAndGoUp(best_parent_unit);
	});
}
function buildListOfMcUnitsWithPotentiallyDifferentWitnesslists(conn, objUnit, last_ball_unit, arrWitnesses, handleList){

	function addAndGoUp(unit){
		readStaticUnitProps(conn, unit, function(props){
			// the parent has the same witness list and the parent has already passed the MC compatibility test
			if (objUnit.witness_list_unit && objUnit.witness_list_unit === props.witness_list_unit)
				return handleList(true, arrMcUnits);
			else
				arrMcUnits.push(unit);
			if (unit === last_ball_unit)
				return handleList(true, arrMcUnits);
			if (!props.best_parent_unit)
				throw Error("no best parent of unit "+unit+"?");
			addAndGoUp(props.best_parent_unit);
		});
	}

	var arrMcUnits = [];
	determineBestParent(conn, objUnit, arrWitnesses, function(best_parent_unit){
		if (!best_parent_unit)
			return handleList(false);
		addAndGoUp(best_parent_unit);
	});
}
function buildListOfMcUnitsWithPotentiallyDifferentWitnesslists ( conn , objUnit , last_ball_unit , arrWitnesses , handleList ) { function addAndGoUp ( unit ) { readStaticUnitProps ( conn , unit , function ( props ) { // the parent has the same witness list and the parent has already passed the MC compatibility test if ( objUnit . witness_list_unit && objUnit . witness_list_unit === props . witness_list_unit ) return handleList ( true , arrMcUnits ) ; else arrMcUnits . push ( unit ) ; if ( unit === last_ball_unit ) return handleList ( true , arrMcUnits ) ; if ( ! props . best_parent_unit ) throw Error ( "no best parent of unit " + unit + "?" ) ; addAndGoUp ( props . best_parent_unit ) ; } ) ; } var arrMcUnits = [ ] ; determineBestParent ( conn , objUnit , arrWitnesses , function ( best_parent_unit ) { if ( ! best_parent_unit ) return handleList ( false ) ; addAndGoUp ( best_parent_unit ) ; } ) ; }
the MC for this function is the MC built from this unit, not our current MC
the MC for this function is the MC built from this unit not our current MC