func TestContactsLess(t *testing.T) { for _, tt := range contactsLessTests { contacts := kademlia.Contacts{tt.contact1, tt.contact2} if tt.lessThanForwards != contacts.Less(0, 1) { t.Error("Contacts Less not ordering based on NodeID") } if tt.lessThanBackwards != contacts.Less(1, 0) { t.Error("Contacts Less not ordering based on NodeID") } } }