Commit graph

702 commits

Author SHA1 Message Date
Wladimir J. van der Laan
cead84b72d
Merge #11536: Rename account to label where appropriate
d2527bd Rename wallet_accounts.py test (Russell Yanofsky)
045eeb8 Rename account to label where appropriate (Russell Yanofsky)

Pull request description:

  Rename account to label where appropriate

  This change only updates strings and adds RPC aliases, but should simplify the implementation of address labels in https://github.com/bitcoin/bitcoin/pull/7729, by getting renaming out of the way and letting that change focus on semantics.

  The difference between accounts and labels is that labels apply only to addresses, while accounts apply to both addresses and transactions (transactions have "from" and "to" accounts). The code associating accounts with transactions is clumsy and unreliable so we would like get rid of it.

  ---

  There is a rebased version of #7729 atop this PR at https://github.com/ryanofsky/bitcoin/commits/pr/label, see https://github.com/bitcoin/bitcoin/pull/7729#issuecomment-338417139.

Tree-SHA512: b3f934e612922d6290f50137f8ba71ddfaea4485713c7d97e89400a8b73b09b254f9186dffa462c77f5847721f5af9852b5572ade5443d8ee95dd150b3edb7ff
2018-03-22 21:27:53 +01:00
Wladimir J. van der Laan
6d36f599f8
Merge #12076: qa: Use node.datadir instead of tmpdir in test framework
c8330d4 qa: Use node.datadir instead of tmpdir in test framework (MarcoFalke)

Pull request description:

  Commit c53c9831ee introduced the utility function `get_datadir_path`, however not all places in the code use this util function. Using the util function everywhere makes it easier to review pull requests related to the datadir.

  This commit replaces datadir path creation with the `datadir` member of `TestNode`, which itself uses `get_datadir_path`.

Tree-SHA512: c75707ab7149d732a6d56152a5813138a33459d3d07577b60b89f2a207c83b7663fac5f203593677c9892d1c23a5eba4bd45c5c4ababf040d720b437240fcddf
2018-03-22 11:10:56 +01:00
Wladimir J. van der Laan
185d48473e
Merge #12718: [Tests] Require exact match in assert_start_raises_init_eror (jnewbery)
fae1374 qa: Allow for partial_match when checking init error (MarcoFalke)
5812273 [Tests] Require exact match in assert_start_raises_init_eror() (John Newbery)
0ec08a6 [Tests] Move assert_start_raises_init_error method to TestNode (John Newbery)

Pull request description:

  Extracted from #12379, because the changes are important on their own.

  This allows for exact testing, since the match can be specified with a strict regex. Internal details (such as exact formatting of the error message) can still be fuzzed away by regex wildcards.

Tree-SHA512: 605d2c9c42362a32d42321b066637577a026d0bb8cfc1c9f5737a4ca6503ffe85457a5122cea6e1101053ccc6c8aa1bbae3602e1fa7d2988bf7d5c275f412f66
2018-03-22 10:31:44 +01:00
MarcoFalke
2b1c50b935
Merge #12747: Fix typos
d27327c79a Fix typos (practicalswift)

Pull request description:

  Fix typos.

Tree-SHA512: f0d13d991acdec0d3adc2f091cd00ccbdda6da3c7623dfb4cbf698bac9eb6b3d88c8ad121256a96cb130f8e97bf54892f3616da0e8dc833dcf713ca7949e2801
2018-03-21 18:04:04 -04:00
MarcoFalke
2405ce1df0
Merge #12746: tests: Remove unused argument max_invalid from check_estimates(...)
a004eb1dae tests: Remove unused argument max_invalid from check_estimates(...) (practicalswift)

Pull request description:

  Remove unused argument `max_invalid` from `check_estimates(...)`.

  _Note to reviewers:_ Let me know if `check_estimates(...)` is incomplete and should be fixed instead.

Tree-SHA512: 93d250184f63baa18212d13960e35ce31ebec574dbbb1af8c40f8f3aa92264b4d03878cb33b7e4e6341e0ef28fa4c1c61ad78e8f3eb0ebd78b8ced45964f362a
2018-03-21 12:00:29 -04:00
MarcoFalke
4ad3b3c72c
Merge #12716: Fix typos and cleanup in various files
4d9b4256d8 Fix typos (Dimitris Apostolou)

Pull request description:

  Unfortunately I messed up my repo while trying to squash #12593 so I created a PR with just the correct fixes.

Tree-SHA512: 295d77b51bd2a9381f1802c263de7ffb2edd670d9647391e32f9a414705b3c8b483bb0e469a9b85ab6a70919ea13397fa8dfda2aea7a398b64b187f178fe6a06
2018-03-21 11:17:43 -04:00
practicalswift
d27327c79a Fix typos 2018-03-21 10:54:17 +01:00
practicalswift
a004eb1dae tests: Remove unused argument max_invalid from check_estimates(...) 2018-03-21 10:38:11 +01:00
Dimitris Apostolou
4d9b4256d8 Fix typos 2018-03-21 08:34:44 +02:00
MarcoFalke
4ba3d4f439
Merge #12728: [tests] rename TestNode to TestP2PConn in tests
728667b771 scripted-diff: rename TestNode to TestP2PConn in tests (John Newbery)

Pull request description:

  Several test scripts define a subclass of P2PInterface called TestNode.
  This commit renames those to TestP2PConn since we already have a
  TestNode class in the test framework.

Tree-SHA512: fc8472677312ad000560fa491b680a441d05c0fee5f8eea2d031d326d81e56d231c235930c0d09dd10afc98d7255fa9f9309d5e2ae6c252bc188a5951644a5b8
2018-03-20 06:44:42 -04:00
Wladimir J. van der Laan
55f490a79f
Merge #12652: bitcoin-cli: Provide a better error message when bitcoind is not running
8b2ef27 tests: Test connecting with non-existing RPC cookie file (practicalswift)
a2b2476 tests: Test connecting to a non-existing server (practicalswift)
de04fde bitcoin-cli: Provide a better error message when bitcoind is not running (practicalswift)

Pull request description:

  Provide a better `bitcoin-cli` error message when `bitcoind` is not running.

  Before this patch:

  ```
  $ killall -9 bitcoind
  $ bitcoin-cli -testnet echo 'hello world'
  error: Could not locate RPC credentials. No authentication cookie could be found, and RPC password is not set.  See -rpcpassword and -stdinrpcpass.  Configuration file: (/root/.bitcoin/bitcoin.conf)
  ```

  After this patch:

  ```
  $ killall -9 bitcoind
  $ bitcoin-cli -testnet echo 'hello world'
  error: Could not connect to the server 127.0.0.1:18332

  Make sure the bitcoind server is running and that you are connecting to the correct RPC port.
  ```

Tree-SHA512: bb16e1a9a1ac110ee202c3cb99b5d7c5c1e5487a17e6cd101e12dc69e9525c14dc71f37b128c26ad615369a57547f15d0f1e29b207c1b2f2ee4b4ba7105f3433
2018-03-20 10:42:10 +01:00
practicalswift
8b2ef27ff9 tests: Test connecting with non-existing RPC cookie file 2018-03-19 22:44:43 +01:00
practicalswift
a2b2476e96 tests: Test connecting to a non-existing server 2018-03-19 22:44:43 +01:00
MarcoFalke
fae137454a
qa: Allow for partial_match when checking init error
This allows the tests to pass on different platforms
2018-03-19 15:49:35 -04:00
John Newbery
728667b771 scripted-diff: rename TestNode to TestP2PConn in tests
Several test scripts define a subclass of P2PInterface called TestNode.
This commit renames those to TestP2PConn since we already have a
TestNode class in the test framework.

-BEGIN VERIFY SCRIPT-
sed -i s/TestNode/TestP2PConn/ test/functional/*py test/functional/test_framework/comptool.py
_END VERIFY SCRIPT-
2018-03-19 14:58:00 -04:00
MarcoFalke
c8330d4216 qa: Use node.datadir instead of tmpdir in test framework 2018-03-19 12:26:00 -04:00
Wladimir J. van der Laan
93634f296e
Merge #12553: Prefer wait_until over polling with time.sleep
9d7f839a2 test: Use os.path.join consistently in feature_pruning tests (Ben Woosley)
81b082277 test: Use wait_until in tests where time was used for polling (Ben Woosley)

Pull request description:

  This is prompted by and builds on #12545, a nice cleanup / consolidation of patterns.

  In cases where the exception message was meaningful, I tried to represent it as well in a comment.

  I expect #12545 will go in first, but I'm happy to squash them if that's preferred.

Tree-SHA512: 7a861244001c87fd6b59b6bc248ee741ac8178f7255d6f1fda39bc693c5ff3b7de5f53d13afe9829aef6ea69153481edb0a9d5bc07c36c4f66b4315edd180bb4
2018-03-19 17:13:51 +01:00
Russell Yanofsky
d2527bd54e Rename wallet_accounts.py test
This is a separate commit because changing the test at the same time as
renaming it breaks git (and github) rename detection.
2018-03-19 12:05:35 -04:00
Russell Yanofsky
045eeb8870 Rename account to label where appropriate
This change only updates strings and adds RPC aliases, but should simplify the
implementation of address labels in
https://github.com/bitcoin/bitcoin/pull/7729, by getting renaming out of the
way and letting it focus on semantics.

The difference between accounts and labels is that labels apply only to
addresses, while accounts apply to both addresses and transactions
(transactions have "from" and "to" accounts). The code associating accounts
with transactions is clumsy and unreliable so we would like get rid of it.
2018-03-19 12:05:35 -04:00
Jeff Rade
0dbb32b2cb Avoiding 'file' function name from python2 with more descriptive variable naming 2018-03-18 17:55:41 -05:00
John Newbery
58122736b5 [Tests] Require exact match in assert_start_raises_init_eror() 2018-03-18 13:32:50 -04:00
John Newbery
0ec08a672d [Tests] Move assert_start_raises_init_error method to TestNode 2018-03-18 12:29:02 -04:00
Jeff Rade
b0fec8d623 Append scripts to new test_list array to fix bad assignment 2018-03-17 13:42:31 -05:00
Jeff Rade
97bcd36811 [Trivial] Simplify if-else blocks and more descriptive variable naming 2018-03-16 13:52:00 -05:00
Ben Woosley
9d7f839a20
test: Use os.path.join consistently in feature_pruning tests 2018-03-15 23:44:02 -07:00
Ben Woosley
81b0822772
test: Use wait_until in tests where time was used for polling 2018-03-15 23:43:53 -07:00
Wladimir J. van der Laan
947c25ead2
Merge #12431: Only call NotifyBlockTip when chainActive changes
f98b54352 Only call NotifyBlockTip when the active chain changes (James O'Beirne)
152b7fb25 [tests] Add a (failing) test for waitforblockheight (James O'Beirne)

Pull request description:

  This is a subset of the more controversial https://github.com/bitcoin/bitcoin/pull/12407, but this also adds a test demonstrating the bug.

  In InvalidateBlock, we're calling NotifyBlockTip with the now-invalid block's prev regardless of what chain the ancestor block is on. This could create numerous issues, but it at least screws up `waitforblockheight` (or anything else relying on `rpc/blockchain.cpp:latestblock`) when InvalidateBlock is called on a block not in chainActive, which can happen via RPC.

  Only call NotifyBlockTip when the block being marked invalid is on the active chain.

Tree-SHA512: 9a54fe5e8c7eb489daf5df4483c0986129e871e2ca931a456ba869ecb5d5a8d4f7bd27ccc9e711e9292c9ed79ddef896c85d0e81fc76883503e327995b0e914f
2018-03-15 17:05:43 +01:00
Wladimir J. van der Laan
ce6ffe196e
Merge #12638: qa: Cache only chain and wallet for regtest datadir
fa23105 qa: Cache only chain and wallet for regtest datadir (MarcoFalke)

Pull request description:

  mempool.dat should be empty and I don't see a need to copy it around when restoring from the cache.

Tree-SHA512: f11ab69732db4dee0e9a0900570464e49085532b0cebc963877057112a7b985c477da3d32eb2093daabac9ada9e73b7c49881681ec5efa6101919b0af76001cf
2018-03-14 14:21:49 +01:00
MarcoFalke
0630974647
Merge #11772: [tests] Change invalidblockrequest to use BitcoinTestFramework
e97b113b04 [tests] Change invalidblockrequest to use BitcoinTestFramework (John Newbery)
2b7064eda7 [tests] Fix flake8 warnings in invalidblockrequest (John Newbery)
54b8c580b7 [test] Fix nits leftover from 11771 (Conor Scott)

Pull request description:

  Builds on #11771. Please review that PR first

  Next step in #10603.

  - first commit tidies up invalidblockrequest.py
  - second commit removes usage of ComparisonTestFramework

Tree-SHA512: 14b10c09c8c0ebef4a9176eb5b883a275d04c096785ee31b84ef594eed346ec6344d7ed32184c5fb397e744725df3911f45cdfadd0810e5a52eaa256084e3456
2018-03-13 17:11:09 -04:00
Wladimir J. van der Laan
702e8b70bd
Merge #11872: [rpc] createrawtransaction: Accept sorted outputs
fac70134a rpc: Update createrawtransaction examples (MarcoFalke)
fa06dfce0 [rpc] createrawtransaction: Accept sorted outputs (MarcoFalke)
8acd25d85 rpc: Allow typeAny in RPCTypeCheck (MarcoFalke)

Pull request description:

  The second parameter of the `createrawtransaction` is a dictionary of the outputs. This comes with at least two drawbacks:

  * In case of duplicate keys, either of them might silently disappear, with no user feedback at all. A user needs to make other mistakes, but this could eventually lead to abnormal tx fees.
  * A dictionary does not guarantee that keys are sorted. Again, a user needs to keep this in mind, as it could eventually lead to excessive tx fees.

  Even though my scenario of loss-of-funds is unlikely to happen, I see it as a inconvenience that should be fixed.

Tree-SHA512: cd562f34f7f9f79c7d3433805971325c388c2035611be283980f4049066a622df4f0afdc11d7ac96662260ec0115147cb65e1ab5268f5a1b063242f3fe425f77
2018-03-13 18:00:06 +01:00
Wladimir J. van der Laan
0f0229d0c3
Merge #12643: [qa] util: Remove unused sync_chain
fa1436c42 [qa] util: Remove unused sync_chain (MarcoFalke)

Pull request description:

  The util function `sync_blocks` already checks for equal chains, so we can remove the unused `sync_chain`.

  Also cleaned up the errors that are printed in case of timeout:

  ```
  AssertionError: Block sync timed out:
    '72a3a3e9dcfd0a09204c3447af0f481d19641eeadbe6a91b8e680ed614bc7712'
    '5032af4ae22ae7a21afdc9d9f516877309c4dd8ef2ecadb9354be7088439b4a6'
    '5032af4ae22ae7a21afdc9d9f516877309c4dd8ef2ecadb9354be7088439b4a6'
  ```
  and
  ```
  AssertionError: Mempool sync timed out:
    {'c2af943d9b321c36e0f5a153a9d3d8b11bdd46ceb28e38f5fd2c722e3edb3563'}
    set()
    set()
  ```

Tree-SHA512: cb4ad30e3e3773072f59afa2c81cfa27bd8f389a93f02acb919990298627fcfbaa53a3d3944d827cc8a5d009871e42a47ea09e9bb93e85c22e3af6a24a574e5d
2018-03-13 17:45:48 +01:00
MarcoFalke
66e91420ab
Merge #12545: test: Use wait_until to ensure ping goes out
0eb84f30d8 test: Use wait_until to ensure ping goes out (Ben Woosley)

Pull request description:

  Intermittent failure evident here:
  https://travis-ci.org/bitcoin/bitcoin/jobs/344021180

Tree-SHA512: 8d3cbc55563160390d3918eb0b22348990cd81ad35c0563033f19142cb43b86a150fecc7df2196209ba00aaa805c67285451e582f387f8dac22d5e44d54e8a0d
2018-03-12 20:52:32 -04:00
MarcoFalke
fa1436c429
[qa] util: Remove unused sync_chain 2018-03-12 20:32:04 -04:00
practicalswift
a7324bd799 Format timestamps using ISO 8601 formatting (e.g. "2018-02-28T12:34:56Z")
* Z is the zone designator for the zero UTC offset.
* T is the delimiter used to separate date and time.

This makes it clear for the end-user that the date/time logged is
specified in UTC and not in the local time zone.
2018-03-09 15:02:01 +01:00
practicalswift
de04fde534 bitcoin-cli: Provide a better error message when bitcoind is not running
Before this patch:

```
$ bitcoin-cli -testnet echo 'hello world'
error: Could not locate RPC credentials. No authentication cookie could be found, and RPC password is not set.  See -rpcpassword and -stdinrpcpass.  Configuration file: (/root/.bitcoin/bitcoin.conf)
```

After this patch:

```
$ bitcoin-cli -testnet echo 'hello world'
error: Could not connect to the server 127.0.0.1:18332

Make sure the bitcoind server is running and that you are connecting to the correct RPC port.
```
2018-03-09 14:55:44 +01:00
MarcoFalke
fa2310572f
qa: Cache only chain and wallet for regtest datadir 2018-03-07 15:53:30 -05:00
MarcoFalke
fa06dfce0f
[rpc] createrawtransaction: Accept sorted outputs 2018-03-07 12:58:14 -05:00
Wladimir J. van der Laan
98bc27fb59
Merge #11687: External wallet files
be8ab7d08 Create new wallet databases as directories rather than files (Russell Yanofsky)
26c06f24e Allow wallet files not in -walletdir directory (Russell Yanofsky)
d8a99f65e Allow wallet files in multiple directories (Russell Yanofsky)

Pull request description:

  This change consists of three commits:

  * The first commit is a pure refactoring that removes the restriction that two wallets can only be opened at the same time if they are contained in the same directory.
  * The second commit removes the restriction that `-wallet` filenames can only refer to files in the `-walletdir` directory.
  * The third commit makes second commit a little safer by changing bitcoin to create wallet databases as directories rather than files, so they can be safely backed up.

  All three commits should be straightforward:

  *  The first commit adds around 20 lines of new code and then updates a bunch of function signatures (generally updating them to take plain fs::path parameters, instead of combinations of strings, fs::paths, and objects like CDBEnv and CWalletDBWrapper).
  * The second commit removes two `-wallet` filename checks and adds some test cases to the multiwallet unit test.
  * The third commit just changes the mapping from specified wallet paths to bdb environment & data paths.

    ---

  **Note:** For anybody looking at this PR for the first time, I think you can skip the comments before _20 Nov_ and start reading at https://github.com/bitcoin/bitcoin/pull/11687#issuecomment-345625565. Comments before  _20 Nov_ were about an earlier version of the PR that didn't include the third commit, and then confusion from not seeing the first commit.

Tree-SHA512: 00bbb120fe0df847cf57014f75f1f7f1f58b0b62fa0b3adab4560163ebdfe06ccdfff33b4231693f03c5dc23601cb41954a07bcea9a4919c8d42f7d62bcf6024
2018-03-07 17:11:54 +01:00
MarcoFalke
791c3ea61b
Merge #12627: qa: Fix some tests to work on native windows
fa3528a85b qa: Fix some tests to work on native windows (MarcoFalke)

Pull request description:

  This allows some more tests to be run natively on Windows

Tree-SHA512: 8097a82dc046be9f6bb0da634758c9afef7836960ca7a1f88f9acab9512dbf7bc26525b515faae407edab4620846cce2b427940298f822e250f23f924b4c7591
2018-03-07 10:30:04 -05:00
Wladimir J. van der Laan
4ca7c1e4ac
Merge #9991: listreceivedbyaddress Filter Address
f08761371 Add tests of listreceivedbyaddress address filtering (Jeremy Rubin)
8ee08120d Add address filtering to listreceivedbyaddress (Jeremy Rubin)

Pull request description:

  Supersede https://github.com/bitcoin/bitcoin/pull/9503 created by @JeremyRubin , I will maintain it.

Tree-SHA512: 2accaed493b7e1c2eb5cb5270180f100f8c718b6585b9574f294191c318dc622a79e42ac185300f291f82d3b2a6f1c00850b6b17e4ff2dbab94d71df695acbfe
2018-03-07 16:07:37 +01:00
Wladimir J. van der Laan
0f7167989d
Merge #12482: [tests] bind functional test nodes to 127.0.0.1
b156ff7c3 [tests] bind functional test nodes to 127.0.0.1 (Sjors Provoost)

Pull request description:

  Replaces #12200 which broke `rpc_bind.py`.

  Prevents OSX firewall allow-this-application-to-accept-inbound-connections permission popups and is generally safer.

  To prevent binding to `127.0.0.1`, set `self.bind_to_localhost_only = False`.

  cc @jnewbery

Tree-SHA512: 5e700124c91bd0cbdee83ca44910071d71d61d8842334755b685d14fbff6454d75de1ea7de67340370386f58b41361e80e90bb4dca5c4d5992f9d2b27985f999
2018-03-07 14:52:42 +01:00
Jeremy Rubin
f087613719 Add tests of listreceivedbyaddress address filtering 2018-03-07 08:31:31 -05:00
MarcoFalke
fa3528a85b
qa: Fix some tests to work on native windows 2018-03-06 18:42:19 -05:00
Sjors Provoost
b156ff7c30
[tests] bind functional test nodes to 127.0.0.1
Prevents OSX firewall allow-this-application-to-accept-inbound-connections
permission popups and is generally safer.

To prevent binding to 127.0.0.1, set self.bind_to_localhost_only = False.
2018-03-06 16:48:15 -05:00
Wladimir J. van der Laan
cd5e4381d4
Merge #12479: RPC: Add child transactions to getrawmempool verbose output
1dfb4e7d7 [Tests] Check output of parent/child tx list from getrawmempool, getmempooldescendants, getmempoolancestors, and REST interface (Conor Scott)
fc44cb108 [RPC] Add list of child transactions to verbose output of getrawmempool (Conor Scott)

Pull request description:

  `bitcoin-cli getrawmempool true` only lists a transaction's parents in the `depends` field. This change adds a `spentby` field to the json response, which lists the transaction's children in the mempool.

  Currently the only way to find child transactions is to use `getrawmempool` or make another call to `getmempooldescendants` and search the response for transactions that list the parent_txid in the `depends` list, which is inefficient.

  This change allows direct lookup of children.

  Example Output
  ```
    "9a9b5733c0d89f207908cfa3fe17809bee71f629aa095c9f8754524e29e98ba4": {
      ...other geterawmempool data...
      "wtxid": "9a9b5733c0d89f207908cfa3fe17809bee71f629aa095c9f8754524e29e98ba4",
      "depends": [
        "bdd92851d5766a42aeb62af667bb422a116cab4e032bba5e3dd6efe5b4b40aa0"
      ],
      "spentby": [
        "dc5d3ec388a9121421208738a041ac30a22163bc2e17758f2275b6c51a15ba7b"
      ]
    },
  ```

Tree-SHA512: 83da7d421c9799a40ef65af3b7fdb586d6d87385f3f2ede3afd2c311725444b858f9d91cc110422a0fa31905779934fee07211ca6fe6b746792b83692c94b3ce
2018-03-06 22:15:18 +01:00
Wladimir J. van der Laan
955fd23517
Merge #12512: Don't test against the mempool min fee information in mempool_limit.py
55f89da1a Don't test against the mempool min fee information in mempool_limit.py (Ben Woosley)

Pull request description:

  Because the right-hand side of this comparison can be influenced
  externally, e.g. via the -maxmempool argument, the existing mempool state,
  host memory usage, etc.

  Called out by @MarcoFalke here: https://github.com/bitcoin/bitcoin/pull/12356#discussion_r170094948

Tree-SHA512: 1644cb8046a6953fb93423a5e51af4f5c7d00a35f10389fddd6a823dae6f31ab367b53af70b3b69161adb9c48f57cf4772db7f4610fd7aadd9c0e9b3da17e9f8
2018-03-05 22:08:19 +01:00
Wladimir J. van der Laan
07d2d2a21c
Merge #12475: qa: Fix python TypeError in script.py
fa41d68a2 qa: Fix python TypeError in script.py (MarcoFalke)

Pull request description:

  `__repr__` returns string, so don't mix it with byte strings.

  This fixes

  ```
  TypeError: %b requires a bytes-like object, or an object that implements __bytes__, not 'str'

Tree-SHA512: fac06e083f245209bc8a36102217580b0f6186842f4e52a686225111b0b96ff93c301640ff5e7ddef6a5b4f1689071b16a9a8dc80f28e2b060ddee29edd24ec7
2018-03-05 17:32:42 +01:00
MarcoFalke
480f42630c
Merge #12543: Fix typos
d918eb7864 Fix typos (practicalswift)

Pull request description:

  Fix typos.

Tree-SHA512: c790e49be6e01c8d70ebd872ef61cc210c1de15c4a1e5a98280169f32dc8a14cd68f4dd1c23afc76758b28ef355ab12ded2ff7504562dc9b69a11839ad3cd7e3
2018-03-05 08:41:25 -05:00
Russell Yanofsky
be8ab7d082 Create new wallet databases as directories rather than files
This change should make it easier for users to make complete backups of wallets
because they can now just back up the specified `-wallet=<path>` path directly,
instead of having to back up the specified path as well as the transaction log
directory (for incompletely flushed wallets).

Another advantage of this change is that if two wallets are located in the same
directory, they will now use their own BerkeleyDB environments instead using a
shared environment. Using a shared environment makes it difficult to manage and
back up wallets separately because transaction log files will contain a mix of
data from all wallets in the environment.
2018-03-03 10:26:55 -05:00
Russell Yanofsky
26c06f24e5 Allow wallet files not in -walletdir directory
Remove restriction that -wallet filenames can only refer to files in the
-walletdir directory.
2018-03-03 10:26:55 -05:00