[Wallet] Add cloned wallet, remove accounts, reset version #7830

pull jonasschnelli wants to merge 7 commits into bitcoin:master from jonasschnelli:2016/04/wallet2 changing 22 files +10074 −6
  1. jonasschnelli commented at 8:53 am on April 7, 2016: contributor

    An alternative solution to #7729

    This adds a clone of the current wallet. The second wallet can be enabled over --enable-lightwallet.

    Includes:

    • The cloned wallet is fully protected in its own namespace Lightwallet::.
    • Thanks to the init.cpp refactoring, the intersection between non-wallet classes is extremely minimal (47 lines in init.cpp).
    • Second wallet can run in parallel to the existing one.
    • Accounts are fully removed (including CAccount, CAccountEntry, etc.).
    • Full labels support from #7729
    • Only one send command (ex sandmany now renamed to “sendcoins”)
    • All backward compatibility/version detection and version-backward-comp.-fixes has been removed
    • Version is reset to 10000

    Benefits:

    • safe way to remove accounts
    • safe way to add BIP32 and multiwallet support
    • safe way to remove BerkleyDB
    • safe way to slowly process separate the wallet (add SPV)
    • safe way to add a complete new GUI
    • no promise of a stable API until 0.14 or 0.15.

    Currently bitcoin-cli misses some value conversion for some commands (you can use cURL for these commands).

    This PR is large because of the copy of the content in src/wallet. You can verify the copy by diffing the first commit and start review on top of that**

  2. [LightWallet] [copy] src/wallet e1c9383edc
  3. [LightWallet] add namespace protection b2ad6a8a93
  4. [LightWallet] add LightWallet compile option 2f12e473d5
  5. jonasschnelli added the label Wallet on Apr 7, 2016
  6. jonasschnelli force-pushed on Apr 7, 2016
  7. instagibbs commented at 11:43 am on April 8, 2016: member
    s/save/safe
  8. [RPC] refactor RPC call handling, allow flexible endpoint registering 72d473e33d
  9. [LightWallet] run LightWallet in parallel to standard wallet 2540123960
  10. [LightWallet] remove accounts entirely 9b9de57317
  11. [Lightwallet] remove version detection and backward-comp. fixes 5a367319ce
  12. jonasschnelli force-pushed on Apr 13, 2016
  13. ghost commented at 2:03 pm on April 15, 2016: none
    Finally!!!! Great to see it’s finally happening.
  14. MarcoFalke commented at 2:49 pm on April 19, 2016: member
    Instead of copying several thousand lines of code, wouldn’t it be possible to avoid that by leaving the current wallet implementation as a base class and then create a derived classes CLegacyWallet() and CLightWallet()? I haven’t looked closely at the code, so I don’t know if it is feasible, but it’s a thought.
  15. in src/httprpc.cpp: in 5a367319ce
    65@@ -66,7 +66,7 @@ static std::string strRPCUserColonPass;
    66 /* Stored RPC timer interface (for unregistration) */
    67 static HTTPRPCTimerInterface* httpRPCTimerInterface = 0;
    68 
    69-static void JSONErrorReply(HTTPRequest* req, const UniValue& objError, const UniValue& id)
    70+void JSONErrorReply(HTTPRequest* req, const UniValue& objError, const UniValue& id)
    


    laanwj commented at 2:04 pm on April 28, 2016:
    Why make this non-static? You’re not ever using this outside httprpc (same for RPCAuthorized and HTTPReq_HandleAuth)
  16. jonasschnelli commented at 9:21 am on May 6, 2016: contributor
    Closing for now. Not sure if this is the best solution. Needs discussion on the bitcoin-core-dev mailing list first.
  17. jonasschnelli closed this on May 6, 2016

  18. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-22 15:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me