validation.js
function checkNoSameAddressInDifferentParents(){
		if (objUnit.parent_units.length === 1)
			return callback();
		var assocAuthors = {};
		var found_address;
		async.eachSeries(
			objUnit.parent_units,
			function(parent_unit, cb){
				storage.readUnitAuthors(conn, parent_unit, function(arrAuthors){
					arrAuthors.forEach(function(address){
						if (assocAuthors[address])
							found_address = address;
						assocAuthors[address] = true;
					});
					cb(found_address);
				});
			},
			function(){
				if (found_address)
					return callback("some addresses found more than once in parents, e.g. "+found_address);
				return callback();
			}
		);
	}
function checkNoSameAddressInDifferentParents(){
		if (objUnit.parent_units.length === 1)
			return callback();
		var assocAuthors = {};
		var found_address;
		async.eachSeries(
			objUnit.parent_units,
			function(parent_unit, cb){
				storage.readUnitAuthors(conn, parent_unit, function(arrAuthors){
					arrAuthors.forEach(function(address){
						if (assocAuthors[address])
							found_address = address;
						assocAuthors[address] = true;
					});
					cb(found_address);
				});
			},
			function(){
				if (found_address)
					return callback("some addresses found more than once in parents, e.g. "+found_address);
				return callback();
			}
		);
	}
function checkNoSameAddressInDifferentParents ( ) { if ( objUnit . parent_units . length === 1 ) return callback ( ) ; var assocAuthors = { } ; var found_address ; async . eachSeries ( objUnit . parent_units , function ( parent_unit , cb ) { storage . readUnitAuthors ( conn , parent_unit , function ( arrAuthors ) { arrAuthors . forEach ( function ( address ) { if ( assocAuthors [ address ] ) found_address = address ; assocAuthors [ address ] = true ; } ) ; cb ( found_address ) ; } ) ; } , function ( ) { if ( found_address ) return callback ( "some addresses found more than once in parents, e.g. " + found_address ) ; return callback ( ) ; } ) ; }
avoid merging the obvious nonserials
avoid merging the obvious nonserials