lbrycrd/src/wallet
Wladimir J. van der Laan 56fe3dc235
Merge #13142: Separate IsMine from solvability
c004ffc9b4 Make handling of invalid in IsMine more uniform (Pieter Wuille)
a53f0feff8 Add some checks for invalid recursion in IsMine (Pieter Wuille)
b5802a9f5f Simplify IsMine logic (Pieter Wuille)
4e91820531 Make IsMine stop distinguishing solvable/unsolvable (Pieter Wuille)
6d714c3419 Make coincontrol use IsSolvable to determine solvability (Pieter Wuille)

Pull request description:

  Our current `IsMine` logic does several things with outputs:
  * Determine "spendability" (roughly corresponding to "could we sign for this")
  * Determine "watching" (is this an output directly or indirectly a watched script)
  * Determine invalidity (is this output definitely not legally spendable, detecting accidental uncompressed pubkeys in witnesses)
  * Determine "solvability" (would we be able to sign for this ignoring the fact that we may be missing some private keys).

  The last item (solvability) is mostly unrelated and only rarely needed (there is just one instance, inside the wallet's coin control logic). This PR changes that instance to use the separate `IsSolvable` function, and stop `IsMine` from distinguishing between solvable and unsolvable.

  As an extra, this also simplifies the `IsMine` logic and adds some extra checks (which wouldn't be hit unless someone adds already invalid scripts to their wallet).

Tree-SHA512: 95a6ef75fbf2eedc5ed938c48a8e5d77dcf09c933372acdd0333129fb7301994a78498f9aacce2c8db74275e19260549dd67a83738e187d40b5090cc04f33adf
2018-05-29 15:12:16 +02:00
..
test wallet: Use shared pointer to retain wallet instance 2018-05-22 16:56:20 +01:00
coincontrol.h Make coincontrol use IsSolvable to determine solvability 2018-05-03 11:01:57 -07:00
coinselection.cpp Add missing newlines to LogPrint debug logging 2018-05-02 15:14:04 +02:00
coinselection.h Fix missing or inconsistent include guards 2018-03-22 16:23:04 +01:00
crypter.cpp Merge #11403: SegWit wallet support 2018-01-10 20:55:41 -10:00
crypter.h tests: Avoid test suite name collision in wallet crypto_tests 2018-04-06 16:29:14 +02:00
db.cpp Merge #13127: wallet: Add Clang thread safety annotations for variables guarded by cs_db 2018-05-14 09:56:47 -04:00
db.h scripted-diff: Rename wallet database classes 2018-04-07 11:48:27 -05:00
feebumper.cpp Merge #13011: Cache witness hash in CTransaction 2018-05-23 19:26:18 +02:00
feebumper.h feebumper: Use PreconditionChecks to determine bump eligibility 2018-01-29 18:31:33 -05:00
fees.cpp wallet: Make fee settings non-static members 2018-04-23 10:49:21 -04:00
fees.h wallet: Make fee settings non-static members 2018-04-23 10:49:21 -04:00
init.cpp wallet: Use shared pointer to retain wallet instance 2018-05-22 16:56:20 +01:00
rpcdump.cpp wallet: Use shared pointer to retain wallet instance 2018-05-22 16:56:20 +01:00
rpcwallet.cpp wallet: Use shared pointer to retain wallet instance 2018-05-22 16:56:20 +01:00
rpcwallet.h wallet: Use shared pointer to retain wallet instance 2018-05-22 16:56:20 +01:00
wallet.cpp Merge #13142: Separate IsMine from solvability 2018-05-29 15:12:16 +02:00
wallet.h wallet: Use shared pointer to retain wallet instance 2018-05-22 16:56:20 +01:00
walletdb.cpp wallet: Use shared pointer to retain wallet instance 2018-05-22 16:56:20 +01:00
walletdb.h [refactor] manually change remaining instances of master key to seed. 2018-05-19 11:21:15 -04:00
walletutil.cpp Don't allow relative -walletdir paths 2018-01-18 15:09:27 -05:00
walletutil.h Fix missing or inconsistent include guards 2018-03-22 16:23:04 +01:00