aboutsummaryrefslogtreecommitdiff
path: root/src/node/psbt.cpp
Commit message (Collapse)AuthorAgeFilesLines
* scripted-diff: Bump copyright headersMarcoFalke2020-04-161-1/+1
| | | | | | -BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./ -END VERIFY SCRIPT-
* doc: Correct spelling errors in commentsBen Woosley2020-03-021-1/+1
| | | | | | And ci script output. Identified via test/lint/lint-spelling
* Make AnalyzePSBT next role calculation simple, correctGregory Sanders2020-02-281-20/+11
|
* Merge #17156: psbt: check that various indexes and amounts are within boundsfanquake2020-01-291-0/+16
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | deaa6dd144f5650b385658a0c4f9a014aff8dde2 psbt: check output index is within bounds before accessing (Andrew Chow) f1ef7f0aa46338f4cd8de79696027a1bf868f359 Don't calculate tx fees for PSBTs with invalid money values (Andrew Chow) Pull request description: Fixes #17149 Two classes of issues were found by the psbt fuzzer: values out of range and causing overflows, and prevout indexes being out of range. This PR fixes both. When accessing a specific output using the index given in the tx, check that it is actually a possible output before trying to access the output. When summing and checking amounts for `decodepsbt` and `analyzepsbt`, make sure that the values are actually valid money values.. Otherwise, stop summing and don't show the fee. For `analyzepsbt`, return that the next role is the Creator since the Creator needs to remake the transaction to be valid. ACKs for top commit: practicalswift: ACK deaa6dd144f5650b385658a0c4f9a014aff8dde2 -- only change since last ACK was the addition of tests gwillen: tested ACK deaa6dd, would also like to see this merged! Tree-SHA512: 06c36720bbb5a7ab1c29f7d15878bf9f0d3e5760c06bff479d412e1bf07bb3e0e9ab6cca820a4bfedaab71bfd7af813807e87cbcdf0af25cc3f66a53a06dbcfd
| * psbt: check output index is within bounds before accessingAndrew Chow2020-01-061-0/+4
| |
| * Don't calculate tx fees for PSBTs with invalid money valuesAndrew Chow2019-12-101-0/+12
| | | | | | | | | | | | | | | | | | In decodepsbt if an invalid amount is seen, don't calculate the fee but still show the invalid value in the decode. In analyze psbt, if an invalid amount is seen, set the next step to be the creator as the creator needs to remake the transaction so that it is valid.
* | scripted-diff: Bump copyright of files changed in 2019MarcoFalke2019-12-301-1/+1
|/ | | | | | -BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./ -END VERIFY SCRIPT-
* Mark PSBTs spending unspendable outputs as invalid in analysisAndrew Chow2019-11-191-0/+6
|
* [build] Move AnalyzePSBT from psbt.cpp to node/psbt.cppRussell Yanofsky2019-04-091-0/+134
psbt.cpp definitions except for AnalyzePSBT are used by the wallet and need to be linked into the wallet binary. AnalyzePSBT is an exception in that it is not used by the wallet, and depends on node classes like CCoinsViewCache, and on node global variables like nBytesPerSigOp. So AnalyzePSBT is more at home in libbitcoin_server than libbitcoin_common, and in any case needs to be defined in a separate object file than other PSBT utilities, to avoid dragging link dependencies on node functions and global variables into the wallet.