func (a RequestP2P) Marshal() []byte {
	var result bytes.Buffer
	encoder := gob.NewEncoder(&result)
	err := encoder.Encode(a)
	if err != nil {
		log.Error(err)
	}
	return result.Bytes()
}
Marshal serializes RequestP2P
package p2p
import (
	"bytes"
	"encoding/gob"
	log "github.com/sirupsen/logrus"
)
const accountsRequestType = "accounts"  
const mappingsRequestType = "mappings"  
const blockRequestType = "block"        
type RequestP2P struct {
	RequestType       string
	RequestParameters map[string]string
}