code: func (sp *serverPeer) OnBlock(_ *peer.Peer, msg *wire.MsgBlock, buf []byte) {
  	// Convert the raw MsgBlock to a btcutil.Block which provides some
  	// convenience methods and things such as hash caching.
  	block := btcutil.NewBlockFromBlockAndBytes(msg, buf)
  
  	// Add the block to the known inventory for the peer.
  	iv := wire.NewInvVect(wire.InvTypeBlock, block.Hash())
  	sp.AddKnownInventory(iv)
  
  	// Queue the block up to be handled by the block
  	// manager and intentionally block further receives
  	// until the bitcoin block is fully processed and known
  	// good or bad.  This helps prevent a malicious peer
  	// from queuing up a bunch of bad blocks before
  	// disconnecting (or being disconnected) and wasting
  	// memory.  Additionally, this behavior is depended on
  	// by at least the block acceptance test tool as the
  	// reference implementation processes blocks in the same
  	// thread and therefore blocks further messages until
  	// the bitcoin block has been fully processed.
  	sp.server.syncManager.QueueBlock(block, sp.Peer, sp.blockProcessed)
  	<-sp.blockProcessed
  }
docs: // OnBlock is invoked when a peer receives a block bitcoin message.  It
  // blocks until the bitcoin block has been fully processed.