fee
and estimated_feerate
values in the the analyzepsbt output to be off if the amount being spent exceed 21.47483647 BTC.
fee
and estimated_feerate
values in the the analyzepsbt output to be off if the amount being spent exceed 21.47483647 BTC.
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
Reviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
@sipa Very nice find. Thanks for fixing.
How did you find this issue? Did you find this by manual or tool assisted analysis?
I had this issue in my back log of conversion warnings to investigate manually but you beat me to it :-)
0rpc/rawtransaction.cpp:1986: conversion to ‘int’ from ‘CAmount {aka long int}’ may alter its value
FWIW, these are all the related CAmount
(int64_t
) conversion warnings I have in my back log (I haven’t analysed any of these yet):
0policy/fees.cpp:1002: conversion to ‘double’ from ‘CAmount {aka long int}’ may alter its value
1policy/fees.cpp:1009: conversion to ‘std::set<double>::key_type {aka double}’ from ‘CAmount {aka long int}’ may alter its value
2rpc/rawtransaction.cpp:1986: conversion to ‘int’ from ‘CAmount {aka long int}’ may alter its value
3test/mempool_tests.cpp:554: conversion to ‘double’ from ‘CAmount {aka long int}’ may alter its value
4test/mempool_tests.cpp:558: conversion to ‘double’ from ‘CAmount {aka long int}’ may alter its value
5test/mempool_tests.cpp:562: conversion to ‘double’ from ‘CAmount {aka long int}’ may alter its value
6test/script_tests.cpp:166: conversion to ‘int’ from ‘CAmount {aka long int}’ may alter its value
7test/script_tests.cpp:332: conversion to ‘int’ from ‘CAmount {aka long int}’ may alter its value
8txmempool.cpp:1012: conversion to ‘double’ from ‘CAmount {aka long int}’ may alter its value
9txmempool.cpp:1013: conversion to ‘double’ from ‘CAmount {aka long int}’ may alter its value
10txmempool.h:235: conversion to ‘double’ from ‘CAmount {aka long int}’ may alter its value
11txmempool.h:309: conversion to ‘double’ from ‘CAmount {aka long int}’ may alter its value
12wallet/test/coinselector_tests.cpp:481: conversion to ‘double’ from ‘CAmount {aka long int}’ may alter its value
utACK c9963ae8b1a4d26d19c58e18fde9c85783edb788
@sipa Are you willing to share how this bug was found? I think it would be valuable to do an informal short “post mortem” of this kind of issues.
That would allow us to reason about which mistakes that are recurring and could be candidates for identification by intelligent use of tooling.
sipa
promag
DrahtBot
achow101
jonasschnelli
practicalswift
laanwj
fanquake
Labels
RPC/REST/ZMQ
Milestone
0.18.0