Parse hidserv*seen_value and hidserv*cells_value as long
We parse seen onion services and relayed cells as double
:
try {
this.hidservDirOnionsSeen = Double.parseDouble(partsNoOpt[1]);
} catch (NumberFormatException e) {
throw new DescriptorParseException("Illegal line '" + line + "'.");
}
and
try {
this.hidservRendRelayedCells = Double.parseDouble(partsNoOpt[1]);
} catch (NumberFormatException e) {
throw new DescriptorParseException("Illegal line '" + line + "'.");
}
However, they should actually be integers as the spec says (emphasis mine):
third, the result of the previous obfuscation steps is truncated to the next smaller *integer* and included as 'NUM'
Edited by Georg Koppen