func (m *mruInventoryMap) Exists(iv *wire.InvVect) bool {
	m.invMtx.Lock()
	_, exists := m.invMap[*iv]
	m.invMtx.Unlock()
	return exists
}
Exists returns whether or not the passed inventory item is in the map.

This function is safe for concurrent access.
package peer
import (
	"bytes"
	"container/list"
	"fmt"
	"sync"
	"github.com/soteria-dag/soterd/wire"
)
type mruInventoryMap struct {
	invMtx  sync.Mutex
	invMap  map[wire.InvVect]*list.Element  
	invList *list.List                      
	limit   uint
}
func (m *mruInventoryMap) String() string {
	m.invMtx.Lock()
	defer m.invMtx.Unlock()
	lastEntryNum := len(m.invMap) - 1
	curEntry := 0
	buf := bytes.NewBufferString("[")
	for iv := range m.invMap {
		buf.WriteString(fmt.Sprintf("%v", iv))
		if curEntry < lastEntryNum {
			buf.WriteString(", ")
		}
		curEntry++
	}
	buf.WriteString("]")
	return fmt.Sprintf("<%d>%s", m.limit, buf.String())
}