Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
[wallet] [tests] Add listwallets RPC, include wallet name in `getwalletinfo` and add multiwallet test #10604
Conversation
|
It's good to add the wallet name to I thought the approach we were going to take for multiwallet RPC support was to add some kind of |
|
Jonas had a suggestion about how we could use different RPC endpoints to access individual wallets here: #8694 (comment) Also more discussion in #8788 |
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 missed that discussion (and can't find mention of |
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.
There's no discussion about listwallets, I was just suggesting that as an alternative to making getwalletinfo return an array. |
fanquake
added the
Wallet
label
Jun 16, 2017
I agree - last meeting we decided on using RPC endpoints to distinguish wallets. This means that the current wallet RPCs, including Also adding a new |
|
@ryanofsky @laanwj - thanks for the useful feedback on the API here. I've updated this PR to add a new The PR still adds Also rebased on master. |
jnewbery
changed the title from
Expose multiwallet in getwalletinfo and add multiwallet test to Add listwallets RPC and add multiwallet test
Jun 27, 2017
jnewbery
referenced
this pull request
Jun 28, 2017
Closed
Simple, backwards compatible RPC multiwallet support (superseded by #10829) #10653
jnewbery
changed the title from
Add listwallets RPC and add multiwallet test to [wallet] [tests] Add listwallets RPC and add multiwallet test
Jun 30, 2017
jnewbery
referenced
this pull request
Jul 3, 2017
Closed
getwalletinfo: return path for wallet file #10733
|
will review |
jnewbery
changed the title from
[wallet] [tests] Add listwallets RPC and add multiwallet test to [wallet] [tests] Add listwallets RPC, include wallet name in `getwalletinfo` and add multiwallet test
Jul 4, 2017
|
rebased |
jnewbery
referenced
this pull request
Jul 4, 2017
Open
[WIP] [wallet] dynamic loading/unloading of wallets #10740
|
API makes sense to me tACK 74882ca |
|
Looks good. |
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? |
ryanofsky
referenced
this pull request
Jul 12, 2017
Open
Multiwallet: add RPC endpoint support #10650
| @@ -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 |
| + "For full information on the wallet, use \"getwalletinfo\"\n" | ||
| + "\nResult:\n" | ||
| + "[\n" | ||
| + " \"walletname\": xxxxx, (string) the wallet name\n" |
| + "For full information on the wallet, use \"getwalletinfo\"\n" | ||
| + "\nResult:\n" | ||
| + "[\n" | ||
| + " \"walletname\": xxxxx, (string) the wallet name\n" |
ryanofsky
Jul 12, 2017
Contributor
Should drop the :xxxx, here since an array is just a list of items, not key/value pairs.
| + + HelpExampleRpc("listwallets", "") | ||
| + ); | ||
| + | ||
| + LOCK(cs_main); |
ryanofsky
Jul 12, 2017
Contributor
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.
|
Also, should maybe clean up the PR description (remove all caps "EDITED") now that #10786 is merged. |
|
@ryanofsky's and @morcos's comments addressed |
|
ACK 011a860 will be awesome to show people all the wallets they can't access! |
|
re-ACK 011a860 |
|
Rebased on the latest #10650 |
|
re-re-ACK 5baca3a |
jnewbery
added some commits
Jun 15, 2017
|
rebased on master now that we have the endpoint PR merged. @laanwj: Any chance of tagging this 0.15? It has 4 ACKs pre-rebase. I think it's useful multiwallet management functionality. |
laanwj
added this to the
0.15.0
milestone
Jul 20, 2017
|
utACK 3707fcd |
|
test failing: from walletencryption.py |
|
bah! Unrelated intermittent travis failure. Job restarted. |
| + UniValue obj(UniValue::VARR); | ||
| + | ||
| + for (CWalletRef pwallet : vpwallets) { | ||
| + |
jnewbery
Jul 21, 2017
Member
Yes, agree, but in the interests of getting this merged, I won't change this now that 3707fcd has two ACKs
|
utACK 3707fcd |
|
ACK 3707fcd |
laanwj
merged commit 3707fcd
into
bitcoin:master
Jul 21, 2017
1 check passed
laanwj
added a commit
that referenced
this pull request
Jul 21, 2017
|
|
laanwj |
420238d
|
|
Nit: No need to run multiwallet.py twice in the test runner ;)
…
|
jonasschnelli
referenced
this pull request
Jul 21, 2017
Merged
[QA] Avoid running multiwallet.py twice #10893
Oops. Good catch! |
MarcoFalke
added a commit
that referenced
this pull request
Jul 22, 2017
|
|
MarcoFalke |
0c173a1
|
jnewbery commentedJun 15, 2017
•
edited
getwalletinforpclistwalletsrpc - returns array of wallet names