Longer lines, types aligned.
-1.0 is already documented (see #6395), but the actual returned value is -1.00000000:
src$ ./bitcoin-cli estimatepriority 1
-1.00000000
src$
What about returning signed int -1 instead of float?
Longer lines, types aligned.
-1.0 is already documented (see #6395), but the actual returned value is -1.00000000:
src$ ./bitcoin-cli estimatepriority 1
-1.00000000
src$
What about returning signed int -1 instead of float?
What about returning signed int -1 instead of float?
According to the JSON standard, all numbers are created equal. So distinguishing between 'int' and 'float' on the client side is not robust.
What I would suggest in clients to check for this error condition is <0. Negative value signifies an error, they should not check for an exact value.
So I will probably change "-1.0 is returned if not enough transactions" to "Negative value is returned if ...". I do not like the difference between -1.0 and -1.000000. It calls for bugs in other applications.
708 | - "n : (numeric) estimated priority\n" 709 | + "n (numeric) estimated priority\n" 710 | "\n" 711 | - "-1.0 is returned if not enough transactions and\n" 712 | - "blocks have been observed to make an estimate.\n" 713 | + "Negative value is returned if not enough transactions and blocks\n"
"A negative value is returned" ?
Fixed. Squashed.