Exemple #1
0
func wantlistContains(wantlist *pb.Message_Wantlist, x string) bool {
	for _, e := range wantlist.GetEntries() {
		if e.GetBlock() == x {
			return true
		}
	}
	return false
}
Exemple #2
0
func wantlistContains(wantlist *pb.Message_Wantlist, c *cid.Cid) bool {
	for _, e := range wantlist.GetEntries() {
		if e.GetBlock() == c.KeyString() {
			return true
		}
	}
	return false
}