func (st *state) mergeComplete(set map[mesh.PeerName]int) (complete mesh.GossipData) {
	st.mtx.Lock()
	defer st.mtx.Unlock()

	for peer, v := range set {
		if v > st.set[peer] {
			st.set[peer] = v
		}
	}

	return &state{
		set: st.set, // n.b. can't .copy() due to lock contention
	}
}
func (st *state) mergeComplete(set map[mesh.PeerName]int) (complete mesh.GossipData) {
	st.mtx.Lock()
	defer st.mtx.Unlock()

	for peer, v := range set {
		if v > st.set[peer] {
			st.set[peer] = v
		}
	}

	return &state{
		set: st.set, 
	}
}
func ( st * state ) mergeComplete ( set map [ mesh . PeerName ] int ) ( complete mesh . GossipData ) { st . mtx . Lock ( ) defer st . mtx . Unlock ( ) for peer , v := range set { if v > st . set [ peer ] { st . set [ peer ] = v } } return & state { set : st . set , // n.b. can't .copy() due to lock contention } }
// Merge the set into our state, abiding increment-only semantics.
// Return our resulting, complete state.
Merge the set into our state abiding increment - only semantics . Return our resulting complete state .