diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2018-07-04 11:29:46 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2018-07-04 11:36:42 +0200 |
commit | 61a044a86ace41aff2bda4915a289376ff9fcd4d (patch) | |
tree | 84e380fa9fcaf63be83daddbff1f51e33543895e /src/init.cpp | |
parent | b9ded733c10afd0896fff376b89f6396eee943b8 (diff) | |
parent | bb582a59c7532b0e4f647d9dfe50f0d816e81427 (diff) | |
download | bitcoin-61a044a86ace41aff2bda4915a289376ff9fcd4d.tar.xz |
Merge #13491: Improve handling of INVALID in IsMine
bb582a59c Add P2WSH destination helper and use it instead of manual hashing (Pieter Wuille)
eaba1c111 Add additional unit tests for invalid IsMine combinations (Pieter Wuille)
e6b9730c4 Do not expose invalidity from IsMine (Pieter Wuille)
Pull request description:
This improves the handling of INVALID in IsMine:
* Extra INVALID conditions were added to `IsMine` (following https://github.com/bitcoin/bitcoin/pull/13142/files#r185349057), but these were untested. Add unit tests for them.
* In https://github.com/bitcoin/bitcoin/pull/13142#issuecomment-386396975 it was suggested to merge `isInvalid` into the return status. This PR takes a different approach, and removes the `isInvalid` entirely. It was only ever used inside tests, as normal users of IsMine don't care about the reason for non-mine-ness, only whether it is or not. As the unit tests are extensive enough, it seems sufficient to have a black box text (with tests for both compressed and uncompressed keys).
Some addition code simplification is done as well.
Tree-SHA512: 3267f8846f3fa4e994f57504b155b0e1bbdf13808c4c04dab7c6886c2c0b88716169cee9c5b350513297e0ca2a00812e3401acf30ac9cde5d892f9fb59ad7fef
Diffstat (limited to 'src/init.cpp')
0 files changed, 0 insertions, 0 deletions