code: func ToP2pMsg(msg []byte) (p2p.Msg, error) {
  	payload := &ProtocolMsg{}
  	if err := rlp.DecodeBytes(msg, payload); err != nil {
  		return p2p.Msg{}, fmt.Errorf("pss protocol handler unable to decode payload as p2p message: %v", err)
  	}
  
  	return p2p.Msg{
  		Code:       payload.Code,
  		Size:       uint32(len(payload.Payload)),
  		ReceivedAt: time.Now(),
  		Payload:    bytes.NewBuffer(payload.Payload),
  	}, nil
  }
docs: // Creates a serialized (non-buffered) version of a p2p.Msg, used in the specialized internal p2p.MsgReadwriter implementations