Add --disable-wallet option to build system #3332

pull laanwj wants to merge 8 commits into bitcoin:master from laanwj:2013_11_wallet_split changing 23 files +687 −537
  1. laanwj commented at 5:03 PM on November 29, 2013: member

    These changes make it possible to build bitcoind as a node only. If built with --disable-wallet, there is no dependency on BDB.

    The commits should be self-explanatory.

    No functional changes: only code movements, build system changes and added #ifdefs.

    (Depends on #3320)

  2. in src/Makefile.am:None in e3c5cbf015 outdated
      52 | -  sync.cpp txdb.cpp txmempool.cpp util.cpp version.cpp wallet.cpp walletdb.cpp $(JSON_H) \
      53 | +  chainparams.cpp \
      54 | +  checkpoints.cpp \
      55 | +  coins.cpp \
      56 | +  init.cpp \
      57 | +  keystore.cpp \
    


    sipa commented at 6:03 PM on November 29, 2013:

    Do you need keystore and crypter without wallet?


    laanwj commented at 6:38 PM on November 29, 2013:

    Yes, at least if we want signrawtransaction, which creates a local keystore. In turn, this depends on crypter.


    sipa commented at 12:07 AM on November 30, 2013:

    You could move CCryptoKeyStore to crypter to break the dependency of rawtransaction on crypter.


    laanwj commented at 5:10 AM on November 30, 2013:

    Ok, good point, done

  3. in src/util.cpp:None in e3c5cbf015 outdated
    1511 | @@ -1511,3 +1512,132 @@ void RenameThread(const char* name)
    1512 |      (void)name;
    1513 |  #endif
    1514 |  }
    1515 | +
    


    sipa commented at 6:06 PM on November 29, 2013:

    I don't think this really belongs in util; why can't it stay in init? Alternatively, some common.cpp or so?


    laanwj commented at 6:45 PM on November 29, 2013:

    It can't stay in init because bitcoin-cli uses the function, and putting init.cpp in libbitcoin_common would not make sense as it's really part of the server (and would pull in a lot of other stuff...).

    I'm fine with a common.cpp, but didn't want to create a new file for one function. Maybe some other things from util.cpp could be moved there as well.


    laanwj commented at 6:48 PM on November 29, 2013:

    Also: after dropping the -cli functionality from bitcoind, which will happen eventually but not yet, we can stop pretending this is common functionality and simply copy the function (as few options will apply to both)


    laanwj commented at 5:21 AM on November 30, 2013:

    I have a possible solution for this too: split up the help function and put a part in rpcclient.cpp and a part in init.cpp. Bitcoind can call both for now to get all the options.

    That reminds me, there are some wallet-specific options as well. We don't want to show them in --disable-wallet builds.

  4. sipa commented at 6:06 PM on November 29, 2013: member

    Didn't test, but I really like this!

  5. ttys2 commented at 6:32 AM on December 1, 2013: none

    I have tested this patch.

    • Configure and compile passes on my system with --disable-wallet set.
    • Configure and compile passes on my system with --disable-wallet unset.
    • disablewallet=0 and --disable-wallet causes no failure, the wallet remains disabled while No wallet compiled in! is printed to the debug log.
  6. laanwj commented at 8:25 AM on December 1, 2013: member

    Thanks for testing @ttys2

  7. laanwj referenced this in commit 0b47fe6bdc on Dec 3, 2013
  8. Move HelpExample* from rpcwallet to rpcserver
    General functions used throughout the RPC framework
    don't belong in rpcwallet.
    bbb093652e
  9. Move getinfo to rpcnet.cpp
    Where to place `getinfo` is a difficult issue
    as it shows information from the wallet, net and
    block chain. However, I moved it out of rpcwallet
    as the command needs also to be available without
    wallet.
    991685d3dc
  10. Delimit code with #ifdef ENABLE_WALLET
    Delimit all code that uses the wallet functions
    in implementation files that conditionally use the wallet.
    48ba56cdfd
  11. Move CAddrDB frrom db to net
    This was a leftover from the times in which
    peers.dat depended in BDB.
    
    Other functions in db.cpp still depend on BerkelyDB,
    to be able to compile without BDB this (small)
    functionality needs to be moved to another file.
    d004d7279f
  12. Add --disable-wallet option to build system
    Make it possible to build Bitcoin without wallet
    (and thus without BDB) so that it only functions as node.
    4f9e993bc9
  13. Update build-unix.md to mention --disable-wallet
    Mention the new --disable-wallet mode.
    Also, correct the BDB entry in the dependencies table.
    ae6ea5a6fa
  14. Move CCryptoKeyStore to crypter.cpp
    This breaks the dependency on crypter for disable-wallet builds.
    829c920387
  15. Split off rpc_wallet_tests
    Split wallet tests from other RPC tests.
    Now no #ifdef ENABLE_WALLET are needed anymore in either file.
    5094f8d46f
  16. BitcoinPullTester commented at 12:21 PM on December 4, 2013: none

    Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/5094f8d46fe3a0f0bcee913d6f1586dcef35749e for binaries and test log. This test script verifies pulls every time they are updated. It, however, dies sometimes and fails to test properly. If you are waiting on a test, please check timestamps to verify that the test.log is moving at http://jenkins.bluematt.me/pull-tester/current/ Contact BlueMatt on freenode if something looks broken.

  17. sipa commented at 4:49 PM on December 7, 2013: member

    ACK, seems to work fine.

  18. laanwj referenced this in commit 05e27c6641 on Dec 8, 2013
  19. laanwj merged this on Dec 8, 2013
  20. laanwj closed this on Dec 8, 2013

  21. laanwj deleted the branch on Apr 9, 2014
  22. Bushstar referenced this in commit 9d5c3d12eb on Apr 8, 2020
  23. Bushstar referenced this in commit 663b4b7266 on Apr 8, 2020
  24. 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: 2026-04-13 15:16 UTC

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