Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wallet] List COutput solvability + wallet_ismine refactoring. #1755

Merged
merged 5 commits into from Aug 8, 2020

Conversation

furszy
Copy link

@furszy furszy commented Jul 21, 2020

Mixing few back ports with code readability improvements.

By commits position:

  1. Moves wallet_ismineh to is mine.h and makes multisig and P2SH tests compile without wallet built-in.
  2. COutput class refactor.
  3. Adds an solvable member in COutput to describe whether an output is solvable by the wallet or not (btc#7688).
  4. Code refactor to make the spendable and solvable definition simpler and not duplicate code.

This is an initial step, will continue moving forward until can split the ismine code from the solvability aspect.

@ambassador000
Copy link

Functionality tested, working as intended, compiled without any issues.

@furszy furszy changed the title List COutput solvability + wallet_ismine refactoring. [wallet] List COutput solvability + wallet_ismine refactoring. Jul 26, 2020
@Fuzzbawls Fuzzbawls added this to the 5.0.0 milestone Jul 26, 2020
@random-zebra random-zebra added this to In Progress in perpetual updating PIVX Core to BTC Core via automation Jul 29, 2020
@Fuzzbawls
Copy link
Collaborator

need to make sure CMake is aware of the file rename:

Index: CMakeLists.txt
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- CMakeLists.txt	(revision fb3924ae7422f3c35cf619a8d06d0293ee488684)
+++ CMakeLists.txt	(date 1596012586895)
@@ -316,6 +316,7 @@
         ./src/rpc/rawtransaction.cpp
         ./src/rpc/server.cpp
         ./src/script/sigcache.cpp
+        ./src/script/ismine.cpp
         ./src/sporkdb.cpp
         ./src/timedata.cpp
         ./src/torcontrol.cpp
@@ -372,7 +373,6 @@
         ./src/legacy/stakemodifier.cpp
         ./src/wallet/wallet.cpp
         ./src/wallet/wallet_zerocoin.cpp
-        ./src/wallet/wallet_ismine.cpp
         ./src/wallet/walletdb.cpp
         ./src/zpiv/zpivwallet.cpp
         ./src/zpiv/zpivtracker.cpp

@furszy
Copy link
Author

furszy commented Jul 29, 2020

hmm yeah, i'm pretty sure that pushed the change to some other branch.

@random-zebra
Copy link

Needs rebase due to conflicts with #1666 just merged.

laanwj and others added 5 commits August 5, 2020 10:38
Removes conditional dependency of `src/test` on wallet.

Makes multisig and P2SH tests complete without wallet built-in.
Adapted version of btc@c3932b32700a210b5fbf36e32bddac604dec9288
@furszy furszy force-pushed the 2020_ismine_updates_step_1 branch from b8e334d to 6f4f351 Compare August 5, 2020 14:06
@furszy
Copy link
Author

furszy commented Aug 5, 2020

done, rebased.

Copy link
Collaborator

@Fuzzbawls Fuzzbawls left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK 6f4f351

Copy link

@random-zebra random-zebra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK 6f4f351

perpetual updating PIVX Core to BTC Core automation moved this from In Progress to Ready Aug 8, 2020
@random-zebra random-zebra merged commit eeb129b into PIVX-Project:master Aug 8, 2020
perpetual updating PIVX Core to BTC Core automation moved this from Ready to Done Aug 8, 2020
furszy added a commit that referenced this pull request Aug 21, 2020
…values

e02edd3 Cleaning isminetype::ISMINE_SPENDABLE_STAKEABLE. (furszy)
1bf9dc4 wallet: unify GetUnspentCredit with GetCredit (furszy)
9f2ae47 wallet: remove currently unused UpdateAmount method. (furszy)
bef69d3 wallet: add cachable amounts for caching credit/debit values (furszy)
8f2a156 Make IsMine stop distinguishing solvable/unsolvable (furszy)
e541593 Make coincontrol use IsSolvable to determine solvability (furszy)
e1a0cfb Back port of IsSolvable to check scripts solvability. (furszy)

Pull request description:

  Built on top of #1755 and #1666 .

  The goal of this PR has been to improve the `CWalletTx` to be able to add shielded cached balances in a much cleaner way.

  Including the following changes:

  * Adapted IsSolvable function from 0c8ea63 (without the witness check. Only used to check regular outputs to be able to decouple the output solvability from `ismine.h` enum)

  * Solvability decoupled from `ismine.h`. Back ported 6d714c3 and 4e91820 from bitcoin#13142.

  * And lastly, adapted bitcoin#15780 beauty cleanup to our sources.

ACKs for top commit:
  random-zebra:
    utACK e02edd3

Tree-SHA512: 3c54397585f2ce1a47a5a86292216b5beab6cbf1e4ad6c289a1daa958cf4c535855bac1e13a7de290bd8d374abef3da7a909b11ee0f5016af31e90f642b448d5
@random-zebra random-zebra modified the milestones: 5.0.0, 4.3.0 Sep 10, 2020
@furszy furszy deleted the 2020_ismine_updates_step_1 branch November 29, 2022 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

5 participants