Skip to content

Conversation

jnewbery
Copy link
Contributor

@jnewbery jnewbery commented Jun 15, 2017

  • fix comment for CWallet::Verify (cleanup after Basic multiwallet support #8694)
  • expose the wallet name in getwalletinfo rpc
  • add listwallets rpc - returns array of wallet names
  • add functional test for multiwallet using new rpc functionality

@ryanofsky
Copy link
Contributor

It's good to add the wallet name to getwalletinfo but I don't see a reason to break backwards compatibility by returning an array in place of the previous wallet info object.

I thought the approach we were going to take for multiwallet RPC support was to add some kind of listwallets API that would return wallet names, and some kind of RPC session variable that would control which wallet is returned by GetWalletForJSONRPCRequest and used by all current wallet apis (including getwalletinfo).

@ryanofsky
Copy link
Contributor

ryanofsky commented Jun 15, 2017

Jonas had a suggestion about how we could use different RPC endpoints to access individual wallets here: #8694 (comment)

Also more discussion in #8788

@jnewbery
Copy link
Contributor Author

Jonas had a suggestion about how we could use different RPC endpoints to access individual wallets

Sounds good, although I don't think that's relevant for this PR, since it doesn't touch any RPCs that are specific to a single wallet.

I thought the approach we were going to take for multiwallet RPC support was to add some kind of listwallets API

I missed that discussion (and can't find mention of listwallets in the PRs you've linked to). Can you point me at where this was discussed? It shouldn't be difficult to change this PR to implement a new listwallets RPC and use that in the test if that's what people want.

@ryanofsky
Copy link
Contributor

Sounds good, although I don't think that's relevant for this PR, since it doesn't touch any RPCs that are specific to a single wallet.

Deriving the wallet from the RPC endpoint is relevant to this PR if you want getwalletinfo to be able to return information about all wallets without changing it to return an array.

I missed that discussion (and can't find mention of listwallets in the PRs you've linked to). Can you point me at where this was discussed? It shouldn't be difficult to change this PR to implement a new listwallets RPC and use that in the test if that's what people want.

There's no discussion about listwallets, I was just suggesting that as an alternative to making getwalletinfo return an array.

@laanwj
Copy link
Member

laanwj commented Jun 22, 2017

It's good to add the wallet name to getwalletinfo but I don't see a reason to break backwards compatibility by returning an array in place of the previous wallet info object.
I thought the approach we were going to take for multiwallet RPC support was to add some kind of listwallets API that would return wallet names, and some kind of RPC session variable that would control which wallet is returned by GetWalletForJSONRPCRequest and used by all current wallet apis (including getwalletinfo).

I agree - last meeting we decided on using RPC endpoints to distinguish wallets. This means that the current wallet RPCs, including getwalletinfo, will take derive the wallet to be use from this. Adding the wallet name to the current API makes sense, of course.

Also adding a new listwallets RPC on a global (not per-wallet) level makes sense. This will keep backward compatibility but make it possible to list the currently loaded wallets.

@jnewbery jnewbery force-pushed the multiwallet_test branch 2 times, most recently from 09d3ee7 to 73f43f1 Compare June 27, 2017 13:49
@jnewbery
Copy link
Contributor Author

@ryanofsky @laanwj - thanks for the useful feedback on the API here.

I've updated this PR to add a new listwallets RPC, which simply lists the names of the currently loaded wallets. The command intentionally shows no information about the wallet. If/when we add multi-user multiwallet functionality, the listwallet RPC should not reveal the contents of the individual wallets.

The PR still adds walletname to the output of the getwalletinfo RPC.

Also rebased on master.

@jnewbery jnewbery changed the title Expose multiwallet in getwalletinfo and add multiwallet test Add listwallets RPC and add multiwallet test Jun 27, 2017
@jnewbery jnewbery changed the title Add listwallets RPC and add multiwallet test [wallet] [tests] Add listwallets RPC and add multiwallet test Jun 30, 2017
@instagibbs
Copy link
Member

will review

@jnewbery jnewbery force-pushed the multiwallet_test branch from af03fe9 to a952c04 Compare July 4, 2017 07:47
@jnewbery jnewbery changed the title [wallet] [tests] Add listwallets RPC and add multiwallet test [wallet] [tests] Add listwallets RPC, include wallet name in getwalletinfo and add multiwallet test Jul 4, 2017
@jnewbery
Copy link
Contributor Author

jnewbery commented Jul 4, 2017

rebased

@instagibbs
Copy link
Member

API makes sense to me

tACK 74882ca

@jonasschnelli
Copy link
Contributor

Looks good.
I'm not sure if we should call it wallet_name on the RPC layer. It's actually the wallet_filename. Maybe we never do, but there is a chance that we once allow to give wallets a name (like other multiwallet software) and not sure if we want the filename char limits there.

@jnewbery
Copy link
Contributor Author

jnewbery commented Jul 5, 2017

I'm not sure if we should call it wallet_name on the RPC layer

Yes, good point to bring up. I see there was some discussion of this here: #10650 (comment) . My personal opinion is that wallet name should always equal filename to avoid confusion, but I'm happy to discuss if other people have different ideas. Perhaps one to bring up in tomorrow's meeting?

Copy link
Contributor

@gmaxwell gmaxwell left a comment

Choose a reason for hiding this comment

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

utACK

@@ -1053,7 +1053,9 @@ class CWallet : public CCryptoKeyStore, public CValidationInterface
//! Flush wallet (bitdb flush)
void Flush(bool shutdown=false);

//! Verify the wallet database and perform salvage if required
//! Responsible for reading and validating the -wallet arguments and verifying the wallet database.
// This function will perform salvage on the wallet if requested, as long as only one wallet is
Copy link
Contributor

Choose a reason for hiding this comment

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

ultranit: extra white space

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks. fixed

"For full information on the wallet, use \"getwalletinfo\"\n"
"\nResult:\n"
"[\n"
" \"walletname\": xxxxx, (string) the wallet name\n"
Copy link
Contributor

Choose a reason for hiding this comment

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

it just prints the wallet name, not a pair

Copy link
Contributor Author

Choose a reason for hiding this comment

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

quite right. Fixed

Copy link
Contributor

@ryanofsky ryanofsky left a comment

Choose a reason for hiding this comment

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

utACK 74882ca0ebc070ba80304e910af4562659e44a1f

+ HelpExampleRpc("listwallets", "")
);

LOCK(cs_main);
Copy link
Contributor

Choose a reason for hiding this comment

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

Probably should drop the cs_main lock. I don't think we decided what lock will be used to guard the vpwallets array, and no lock is used other places (it's not needed since the list doesn't change after initialization) so it would be inconsistent to add this here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done. Thanks!

"For full information on the wallet, use \"getwalletinfo\"\n"
"\nResult:\n"
"[\n"
" \"walletname\": xxxxx, (string) the wallet name\n"
Copy link
Contributor

Choose a reason for hiding this comment

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

Should drop the :xxxx, here since an array is just a list of items, not key/value pairs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yup. Fixed

@ryanofsky
Copy link
Contributor

Also, should maybe clean up the PR description (remove all caps "EDITED") now that #10786 is merged.

@jnewbery
Copy link
Contributor Author

bah! Unrelated intermittent travis failure. Job restarted.

UniValue obj(UniValue::VARR);

for (CWalletRef pwallet : vpwallets) {

Copy link
Contributor

Choose a reason for hiding this comment

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

nit newline

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, agree, but in the interests of getting this merged, I won't change this now that 3707fcd has two ACKs

@jonasschnelli
Copy link
Contributor

utACK 3707fcd

@instagibbs
Copy link
Member

ACK 3707fcd

@laanwj laanwj merged commit 3707fcd into bitcoin:master Jul 21, 2017
laanwj added a commit that referenced this pull request Jul 21, 2017
…me in `getwalletinfo` and add multiwallet test

3707fcd [wallet] [tests] Add listwallets to multiwallet test (John Newbery)
9508761 [wallet] [rpc] Add listwallets RPC (John Newbery)
4a05715 [wallet] [rpc] print wallet name in getwalletinfo (John Newbery)
09eacee [wallet] fix comment for CWallet::Verify() (John Newbery)

Pull request description:

  - fix comment for CWallet::Verify (cleanup after #8694)
  - expose the wallet name in `getwalletinfo` rpc
  - add `listwallets` rpc - returns array of wallet names
  - add functional test for multiwallet using new rpc functionality

Tree-SHA512: 52f864726bf8a28421d4f3604a6cb95fffb3f4e19edbce18efaef06142c48dd4adb9e7a65a10de2955c80f13c00803ce27c78ccbc8434d92ef12cd36c4ccb4aa
@maflcko
Copy link
Member

maflcko commented Jul 21, 2017 via email

@jnewbery
Copy link
Contributor Author

Nit: No need to run multiwallet.py twice in the test runner ;)

Oops. Good catch!

maflcko pushed a commit that referenced this pull request Jul 22, 2017
44eb9d4 [QA] Avoid running multiwallet.py twice (Jonas Schnelli)

Pull request description:

  It's already on L92.

  Second script execution was introduced in #10604 3707fcd (probably rebase issue)

  Reported by @MarcoFalke

Tree-SHA512: cd2873df08e31cbf5b7a43b5e6713b643b758496d4357dcc99d1c3ad2da07e55f6d69996654d17d3f5484219cb5fd4e32da3bfd94701d1137bc955241d285e57
@jnewbery jnewbery mentioned this pull request Jul 28, 2017
12 tasks
@jnewbery jnewbery deleted the multiwallet_test branch October 10, 2017 17:33
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Aug 6, 2019
…llet name in `getwalletinfo` and add multiwallet test

3707fcd [wallet] [tests] Add listwallets to multiwallet test (John Newbery)
9508761 [wallet] [rpc] Add listwallets RPC (John Newbery)
4a05715 [wallet] [rpc] print wallet name in getwalletinfo (John Newbery)
09eacee [wallet] fix comment for CWallet::Verify() (John Newbery)

Pull request description:

  - fix comment for CWallet::Verify (cleanup after bitcoin#8694)
  - expose the wallet name in `getwalletinfo` rpc
  - add `listwallets` rpc - returns array of wallet names
  - add functional test for multiwallet using new rpc functionality

Tree-SHA512: 52f864726bf8a28421d4f3604a6cb95fffb3f4e19edbce18efaef06142c48dd4adb9e7a65a10de2955c80f13c00803ce27c78ccbc8434d92ef12cd36c4ccb4aa
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Aug 6, 2019
44eb9d4 [QA] Avoid running multiwallet.py twice (Jonas Schnelli)

Pull request description:

  It's already on L92.

  Second script execution was introduced in bitcoin#10604 3707fcd (probably rebase issue)

  Reported by @MarcoFalke

Tree-SHA512: cd2873df08e31cbf5b7a43b5e6713b643b758496d4357dcc99d1c3ad2da07e55f6d69996654d17d3f5484219cb5fd4e32da3bfd94701d1137bc955241d285e57
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Aug 6, 2019
…llet name in `getwalletinfo` and add multiwallet test

3707fcd [wallet] [tests] Add listwallets to multiwallet test (John Newbery)
9508761 [wallet] [rpc] Add listwallets RPC (John Newbery)
4a05715 [wallet] [rpc] print wallet name in getwalletinfo (John Newbery)
09eacee [wallet] fix comment for CWallet::Verify() (John Newbery)

Pull request description:

  - fix comment for CWallet::Verify (cleanup after bitcoin#8694)
  - expose the wallet name in `getwalletinfo` rpc
  - add `listwallets` rpc - returns array of wallet names
  - add functional test for multiwallet using new rpc functionality

Tree-SHA512: 52f864726bf8a28421d4f3604a6cb95fffb3f4e19edbce18efaef06142c48dd4adb9e7a65a10de2955c80f13c00803ce27c78ccbc8434d92ef12cd36c4ccb4aa
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Aug 6, 2019
44eb9d4 [QA] Avoid running multiwallet.py twice (Jonas Schnelli)

Pull request description:

  It's already on L92.

  Second script execution was introduced in bitcoin#10604 3707fcd (probably rebase issue)

  Reported by @MarcoFalke

Tree-SHA512: cd2873df08e31cbf5b7a43b5e6713b643b758496d4357dcc99d1c3ad2da07e55f6d69996654d17d3f5484219cb5fd4e32da3bfd94701d1137bc955241d285e57
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Aug 6, 2019
…llet name in `getwalletinfo` and add multiwallet test

3707fcd [wallet] [tests] Add listwallets to multiwallet test (John Newbery)
9508761 [wallet] [rpc] Add listwallets RPC (John Newbery)
4a05715 [wallet] [rpc] print wallet name in getwalletinfo (John Newbery)
09eacee [wallet] fix comment for CWallet::Verify() (John Newbery)

Pull request description:

  - fix comment for CWallet::Verify (cleanup after bitcoin#8694)
  - expose the wallet name in `getwalletinfo` rpc
  - add `listwallets` rpc - returns array of wallet names
  - add functional test for multiwallet using new rpc functionality

Tree-SHA512: 52f864726bf8a28421d4f3604a6cb95fffb3f4e19edbce18efaef06142c48dd4adb9e7a65a10de2955c80f13c00803ce27c78ccbc8434d92ef12cd36c4ccb4aa
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Aug 6, 2019
44eb9d4 [QA] Avoid running multiwallet.py twice (Jonas Schnelli)

Pull request description:

  It's already on L92.

  Second script execution was introduced in bitcoin#10604 3707fcd (probably rebase issue)

  Reported by @MarcoFalke

Tree-SHA512: cd2873df08e31cbf5b7a43b5e6713b643b758496d4357dcc99d1c3ad2da07e55f6d69996654d17d3f5484219cb5fd4e32da3bfd94701d1137bc955241d285e57
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Aug 7, 2019
…llet name in `getwalletinfo` and add multiwallet test

3707fcd [wallet] [tests] Add listwallets to multiwallet test (John Newbery)
9508761 [wallet] [rpc] Add listwallets RPC (John Newbery)
4a05715 [wallet] [rpc] print wallet name in getwalletinfo (John Newbery)
09eacee [wallet] fix comment for CWallet::Verify() (John Newbery)

Pull request description:

  - fix comment for CWallet::Verify (cleanup after bitcoin#8694)
  - expose the wallet name in `getwalletinfo` rpc
  - add `listwallets` rpc - returns array of wallet names
  - add functional test for multiwallet using new rpc functionality

Tree-SHA512: 52f864726bf8a28421d4f3604a6cb95fffb3f4e19edbce18efaef06142c48dd4adb9e7a65a10de2955c80f13c00803ce27c78ccbc8434d92ef12cd36c4ccb4aa
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Aug 7, 2019
44eb9d4 [QA] Avoid running multiwallet.py twice (Jonas Schnelli)

Pull request description:

  It's already on L92.

  Second script execution was introduced in bitcoin#10604 3707fcd (probably rebase issue)

  Reported by @MarcoFalke

Tree-SHA512: cd2873df08e31cbf5b7a43b5e6713b643b758496d4357dcc99d1c3ad2da07e55f6d69996654d17d3f5484219cb5fd4e32da3bfd94701d1137bc955241d285e57
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Aug 8, 2019
…llet name in `getwalletinfo` and add multiwallet test

3707fcd [wallet] [tests] Add listwallets to multiwallet test (John Newbery)
9508761 [wallet] [rpc] Add listwallets RPC (John Newbery)
4a05715 [wallet] [rpc] print wallet name in getwalletinfo (John Newbery)
09eacee [wallet] fix comment for CWallet::Verify() (John Newbery)

Pull request description:

  - fix comment for CWallet::Verify (cleanup after bitcoin#8694)
  - expose the wallet name in `getwalletinfo` rpc
  - add `listwallets` rpc - returns array of wallet names
  - add functional test for multiwallet using new rpc functionality

Tree-SHA512: 52f864726bf8a28421d4f3604a6cb95fffb3f4e19edbce18efaef06142c48dd4adb9e7a65a10de2955c80f13c00803ce27c78ccbc8434d92ef12cd36c4ccb4aa
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Aug 8, 2019
44eb9d4 [QA] Avoid running multiwallet.py twice (Jonas Schnelli)

Pull request description:

  It's already on L92.

  Second script execution was introduced in bitcoin#10604 3707fcd (probably rebase issue)

  Reported by @MarcoFalke

Tree-SHA512: cd2873df08e31cbf5b7a43b5e6713b643b758496d4357dcc99d1c3ad2da07e55f6d69996654d17d3f5484219cb5fd4e32da3bfd94701d1137bc955241d285e57
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Aug 12, 2019
…llet name in `getwalletinfo` and add multiwallet test

3707fcd [wallet] [tests] Add listwallets to multiwallet test (John Newbery)
9508761 [wallet] [rpc] Add listwallets RPC (John Newbery)
4a05715 [wallet] [rpc] print wallet name in getwalletinfo (John Newbery)
09eacee [wallet] fix comment for CWallet::Verify() (John Newbery)

Pull request description:

  - fix comment for CWallet::Verify (cleanup after bitcoin#8694)
  - expose the wallet name in `getwalletinfo` rpc
  - add `listwallets` rpc - returns array of wallet names
  - add functional test for multiwallet using new rpc functionality

Tree-SHA512: 52f864726bf8a28421d4f3604a6cb95fffb3f4e19edbce18efaef06142c48dd4adb9e7a65a10de2955c80f13c00803ce27c78ccbc8434d92ef12cd36c4ccb4aa
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Aug 12, 2019
44eb9d4 [QA] Avoid running multiwallet.py twice (Jonas Schnelli)

Pull request description:

  It's already on L92.

  Second script execution was introduced in bitcoin#10604 3707fcd (probably rebase issue)

  Reported by @MarcoFalke

Tree-SHA512: cd2873df08e31cbf5b7a43b5e6713b643b758496d4357dcc99d1c3ad2da07e55f6d69996654d17d3f5484219cb5fd4e32da3bfd94701d1137bc955241d285e57
barrystyle pushed a commit to PACGlobalOfficial/PAC that referenced this pull request Jan 22, 2020
…llet name in `getwalletinfo` and add multiwallet test

3707fcd [wallet] [tests] Add listwallets to multiwallet test (John Newbery)
9508761 [wallet] [rpc] Add listwallets RPC (John Newbery)
4a05715 [wallet] [rpc] print wallet name in getwalletinfo (John Newbery)
09eacee [wallet] fix comment for CWallet::Verify() (John Newbery)

Pull request description:

  - fix comment for CWallet::Verify (cleanup after bitcoin#8694)
  - expose the wallet name in `getwalletinfo` rpc
  - add `listwallets` rpc - returns array of wallet names
  - add functional test for multiwallet using new rpc functionality

Tree-SHA512: 52f864726bf8a28421d4f3604a6cb95fffb3f4e19edbce18efaef06142c48dd4adb9e7a65a10de2955c80f13c00803ce27c78ccbc8434d92ef12cd36c4ccb4aa
barrystyle pushed a commit to PACGlobalOfficial/PAC that referenced this pull request Jan 22, 2020
44eb9d4 [QA] Avoid running multiwallet.py twice (Jonas Schnelli)

Pull request description:

  It's already on L92.

  Second script execution was introduced in bitcoin#10604 3707fcd (probably rebase issue)

  Reported by @MarcoFalke

Tree-SHA512: cd2873df08e31cbf5b7a43b5e6713b643b758496d4357dcc99d1c3ad2da07e55f6d69996654d17d3f5484219cb5fd4e32da3bfd94701d1137bc955241d285e57
random-zebra added a commit to PIVX-Project/PIVX that referenced this pull request Jun 9, 2021
d5526bd Wrap dumpwallet warning and note scripts aren't dumped (MeshCollider)
3711c6a Add wallet backup text to import*, add* and dumpwallet RPCs (MeshCollider)
dbda874 [Wallet] always show help-line of wallet encryption calls (Jonas Schnelli)
20c269b Avoid opening copied wallet databases simultaneously (Russell Yanofsky)
e411b70 [wallet] Fix leak in CDB constructor (João Barbosa)
f15aeea Change getmininginfo errors field to warnings (Andrew Chow)
c04390b Unify help text for GetWarnings output in get*info RPCs (random-zebra)
1d966ce Add warnings field to getblockchaininfo (Andrew Chow)
ffcd781 [Trivial] Cleanup after MOVE-ONLY commits (random-zebra)
e067235 MOVEONLY: Init functions wallet/wallet.cpp -> wallet/init.cpp (random-zebra)
e947eec MOVEONLY: Fee functions wallet/wallet.cpp -> wallet/fees.cpp (random-zebra)
2188c3e Move some static functions out of wallet.h/cpp (random-zebra)
f49acf7 [wallet] [moveonly] Move CAffectedKeysVisitor (random-zebra)
8bd979f [wallet] Specify wallet name in wallet loading errors (random-zebra)
900bbfa Reject invalid wallet files (João Barbosa)
a1f4e2a Reject duplicate wallet filenames (random-zebra)
ee52c2e Fix misleading "Method not found" multiwallet errors (Russell Yanofsky)
ce35e1e [Qt] Use wallet 0 in rpc console if running with multiple wallets (random-zebra)
37089d1 [tests] Update wallet_multiwallet.py functional test (random-zebra)
3955ee9 [Doc] Update release notes (random-zebra)
4fd5913 [wallet] [rpc] Add listwallets RPC (John Newbery)
1525281 [wallet] [rpc] print wallet name in getwalletinfo (John Newbery)
fdf5da0 [wallet] fix comment for CWallet::Verify() (John Newbery)
cf4a90b Remove factor of 3 from definition of dust. (random-zebra)
a1c56fd [Policy] Introduce -dustrelayfee (random-zebra)
9fb29cc [Doc] Update multiwallet release notes (random-zebra)
379255e [Tests][Trivial] Add wallet_multiwallet.py to test_runner (random-zebra)
808fbc3 [Bugfix] consider boolean value of -zapwallettxes ParameterInteraction (random-zebra)
f9141f8 [QA] Add wallet_multiwallet.py functional test (John Newbery)
2e02006 Rename -usewallet to -rpcwallet (Alex Morcos)
a64440b Select wallet based on the given endpoint (Jonas Schnelli)
5683a9c Complete previous commit by moving mn stuff out of libbitcoin_wallet (random-zebra)
b0fe92f Fix test_pivx circular dependency issue (random-zebra)
6cb2b92 Add wallet endpoint support to bitcoin-cli (-usewallet) (Jonas Schnelli)
7dd3916 Register wallet endpoint (Jonas Schnelli)
5bd1bd7 Properly forbid -salvagewallet and -zapwallettxes for multi wallet. (Alex Morcos)
41a7335 Remove unused variables (practicalswift)
5c3d73f Avoid CWalletTx copies in GetAddressBalances and GetAddressGroupings (Russell Yanofsky)
e7cafab [Refactoring] Mimic ListCoins for sapling notes (random-zebra)
54fa122 [qt] Move some WalletModel functions into CWallet (random-zebra)
494ba64 [test] Add test for getmemoryinfo (random-zebra)
2394083 [Wallet] unset change position when there is no change on exact match (Gregory Sanders)
7d977ac Remove unused C++ code not covered by unit tests (random-zebra)
60bb4da ApproximateBestSubset should take inputs by reference, not value (Ryan Havar)
3633d75 Initialize nRelockTime (Patrick Strateman)
3a599d0 [Refactor] Return safeTx boolean in CheckTXAvailability (random-zebra)
f219be9 Add safe flag to listunspent result (NicolasDorier)
0201065 Add COutput::fSafe member for safe handling of unconfirmed outputs (random-zebra)
75c8c6d Disallow copy of CReserveKeys (Gregory Sanders)
8378322 [Refactor] Replace optional reserveKey in PBF with unique pointer (random-zebra)

Pull request description:

  I think these are all the remaining Bitcoin Core v0.15 PRs in the wallet area that we don't have yet, and are useful to us.
  I've grouped them here since they are all pretty small, simple, and narrow-focused (on the wallet/rpcwallet files).

  This changeset is based on top of
  - [x] #2337

  as it keeps going with the multiwallet implementation, adding:
  - RPC endpoint support
  - `listwallets` RPC
  - wallet name in `getwalletinfo` RPC
  - `wallet_multiwallet.py` functional test

  As in some areas we are much closer to upstream, some of the commits needed adaptations (especially the functional tests). A couple of commits have been extended to include shield-related code.

  List of upstream PRs backported/adapted:

  - bitcoin#9906  : Disallow copy constructor CReserveKeys
  - bitcoin#9830  : Add safe flag to listunspent result
  - bitcoin#9993  : Initialize nRelockTime
  - bitcoin#10108 : ApproximateBestSubset should take inputs by reference, not value
  - bitcoin#10075 : Remove unused C++ code not covered by unit tests
  - bitcoin#10257 : Add test for getmemoryinfo
  - bitcoin#10295 : Move some WalletModel functions into CWallet
  - bitcoin#10500 : Avoid CWalletTx copies in GetAddressBalances and GetAddressGroupings
  - bitcoin#10522 : Remove unused variables
  - bitcoin#10816 : Properly forbid -salvagewallet and -zapwallettxes for multi wallet
  - bitcoin#10849 : Multiwallet: simplest endpoint support
  - bitcoin#9380  : Separate different uses of minimum fees (only dustRelayFee)
  - bitcoin#10817 : Redefine Dust and add a discard_rate (only first commit)
  - bitcoin#10883 : Rename -usewallet to -rpcwallet
  - bitcoin#10604 : Add listwallets RPC, include wallet name in getwalletinfo + tests
  - bitcoin#10893 : Avoid running multiwallet.py twice
  - bitcoin#10870 : Use wallet 0 in rpc console if running with multiple wallets
  - bitcoin#10931 : Fix misleading "method not found" multiwallet errors
  - bitcoin#10885 : Reject invalid wallets
  - bitcoin#11022 : Basic keypool topup
  - bitcoin#10976 : [MOVEONLY] Move some static functions out of wallet.h/cpp
  - bitcoin#11310 : Test listwallets RPC
  - bitcoin#10858 : "errors" to getblockchaininfo + unify "errors" field in get*info RPCs
  - bitcoin#11492 : Fix leak in CDB constructor
  - bitcoin#11476 : Avoid opening copied wallet databases simultaneously
  - bitcoin#11590 : always show help-line of wallet encryption calls
  - bitcoin#11289 : Add wallet backup text to import* and add* RPCs

ACKs for top commit:
  furszy:
    re-re-utACK d5526bd.
  Fuzzbawls:
    ACK d5526bd

Tree-SHA512: 115c4916ee212539b0a1b2cb25783ddf6753f5376de739a084191e874ed8717fff2c7cd9d744e397891f14eaa459ef2f48d675168621ef7316e81758fa6559f2
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants