(excludedList map[uint64]struct{}, start, end, count uint64)
| 487 | } |
| 488 | |
| 489 | func getRandomU64InRange(excludedList map[uint64]struct{}, start, end, count uint64) map[uint64]struct{} { |
| 490 | i := uint64(0) |
| 491 | m := make(map[uint64]struct{}) |
| 492 | for i < count { |
| 493 | idx := rand.Uint64()%(end-start) + start |
| 494 | if _, ok := excludedList[idx]; ok { |
| 495 | continue |
| 496 | } |
| 497 | if _, ok := m[idx]; ok { |
| 498 | continue |
| 499 | } |
| 500 | m[idx] = struct{}{} |
| 501 | i++ |
| 502 | } |
| 503 | return m |
| 504 | } |
| 505 | |
| 506 | // TestSync_RequestL2Range test peer RequestBlobsByRange func and verify result |
| 507 | func TestSync_RequestL2Range(t *testing.T) { |
no outgoing calls
no test coverage detected