protected synchronized void handleRecieveBlock(Block block) {
		
		System.out.println("block recieved!");
		
		// here goes the code to handle the block broadcast
		
		// get the block , add it to the tree
		
		SignedBlock sb = (SignedBlock)block;
		
		try {
			
			this.blockTree.addBlock(sb);
			
			// generate a diagram
			

			
			String diagramFilename = "graphs/graph"+logPrefix+"-"+this.thisThreadNum+"-"+ blockCounter++ +".svg";
			this.blockTree.printDOT( diagramFilename );
			
			LOGGER.log( new ThreadIDLogRecord( Level.INFO, 
											   "<a href=\"" + diagramFilename + "\">block recieved #"+ sb.serialNum +"</a>", 
											   thisThreadNum ) );
			
		} catch (BlockHasNoPreviousException e) {
			
			LOGGER.log( new ThreadIDLogRecord( Level.INFO, 
					   "<span style=\"color:red;\">BLOCK HAS NO PREVIOUS</span>",
					thisThreadNum ) );
			
		} catch (IOException e) {
			
			LOGGER.log( new ThreadIDLogRecord( Level.INFO, 
					   "<span style=\"color:red;\">CANT WRITE FILE</span>",
					thisThreadNum ) );
			
		} catch (Exception e ) {
			
			LOGGER.log( new ThreadIDLogRecord( Level.INFO, 
					   "<span style=\"color:red;\">ERRAR</span>",
					thisThreadNum ) );
			
		}
		
	}