bug6538 793 B

12345678910111213141516
  1. o Minor bugfixes:
  2. - Switch weighted node selection rule from using a list of doubles
  3. to using a list of int64_t. This should make the process slightly
  4. easier to debug and maintain. Needed for fix for bug 6538.
  5. o Security features:
  6. - Switch to a completely time-invariant approach for picking nodes
  7. weighted by bandwidth. Our old approach would run through the
  8. part of the loop after it had made its choice slightly slower
  9. than it ran through the part of the loop before it had made its
  10. choice. Fix for bug 6538.
  11. o Code simplifications and refactoring:
  12. - Move the core of our "choose a weighted element at random" logic
  13. into its own function, and give it unit tests. Now the logic is
  14. testable, and a little less fragile too.