[tor-bugs] #29712 [Core Tor/sbws]: sbws should use 1024 to convert kilobytes to bytes

Tor Bug Tracker & Wiki blackhole at torproject.org
Sat Mar 9 21:49:37 UTC 2019


#29712: sbws should use 1024 to convert kilobytes to bytes
---------------------------+-----------------------------------
 Reporter:  teor           |          Owner:  (none)
     Type:  defect         |         Status:  new
 Priority:  Low            |      Milestone:  sbws: 1.0.x-final
Component:  Core Tor/sbws  |        Version:
 Severity:  Minor          |     Resolution:
 Keywords:                 |  Actual Points:
Parent ID:                 |         Points:  0.2
 Reviewer:                 |        Sponsor:
---------------------------+-----------------------------------

Old description:

> sbws converts kilobytes to bytes using 1000. But most systems use 1024 to
> conviert kilobytes to bytes.
>
> Fixing this issue is not a high priority, because bandwidth measurements
> are only 20-50% accurate.

New description:

 sbws converts kilobytes to bytes using 1000. But most systems use 1024 to
 conviert kilobytes to bytes.

 Fixing this issue is not a high priority, because bandwidth measurements
 are only 20-50% accurate.

 Also, the conversion factor should be a constant, rather than copying 1024
 to lots of places in the code.

--

Comment (by teor):

 Edit: use a constant

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/29712#comment:1>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list