code: func (b *PayloadsBufferImpl) Pop() *proto.Payload {
  	b.mutex.Lock()
  	defer b.mutex.Unlock()
  
  	result := b.buf[b.Next()]
  
  	if result != nil {
  		// If there is such sequence in the buffer need to delete it
  		delete(b.buf, b.Next())
  		// Increment next expect block index
  		atomic.AddUint64(&b.next, 1)
  
  		b.drainReadChannel()
  
  	}
  
  	return result
  }
docs: // Pop function extracts the payload according to the next expected block
  // number, if no next block arrived yet, function returns nil.