func (p *peer) OnGossipBroadcast(src mesh.PeerName, buf []byte) (received mesh.GossipData, err error) {
	var set map[mesh.PeerName]int
	if err := gob.NewDecoder(bytes.NewReader(buf)).Decode(&set); err != nil {
		return nil, err
	}

	received = p.st.mergeReceived(set)
	if received == nil {
		p.logger.Printf("OnGossipBroadcast %s %v => delta %v", src, set, received)
	} else {
		p.logger.Printf("OnGossipBroadcast %s %v => delta %v", src, set, received.(*state).set)
	}
	return received, nil
}
func (p *peer) OnGossipBroadcast(src mesh.PeerName, buf []byte) (received mesh.GossipData, err error) {
	var set map[mesh.PeerName]int
	if err := gob.NewDecoder(bytes.NewReader(buf)).Decode(&set); err != nil {
		return nil, err
	}

	received = p.st.mergeReceived(set)
	if received == nil {
		p.logger.Printf("OnGossipBroadcast %s %v => delta %v", src, set, received)
	} else {
		p.logger.Printf("OnGossipBroadcast %s %v => delta %v", src, set, received.(*state).set)
	}
	return received, nil
}
func ( p * peer ) OnGossipBroadcast ( src mesh . PeerName , buf [ ] byte ) ( received mesh . GossipData , err error ) { var set map [ mesh . PeerName ] int if err := gob . NewDecoder ( bytes . NewReader ( buf ) ) . Decode ( & set ) ; err != nil { return nil , err } received = p . st . mergeReceived ( set ) if received == nil { p . logger . Printf ( " " , src , set , received ) } else { p . logger . Printf ( " " , src , set , received . ( * state ) . set ) } return received , nil }
// Merge the gossiped data represented by buf into our state.
// Return the state information that was modified.
Merge the gossiped data represented by buf into our state . Return the state information that was modified .