RPC refactoring: Access wallet using new GetWalletForJSONRPCRequest #8775

pull luke-jr wants to merge 9 commits into bitcoin:master from luke-jr:multiwallet_prefactor_rpc changing 11 files +600 −423
  1. luke-jr commented at 9:56 am on September 21, 2016: member
    Part of the refactorings needed for basic multiwallet (#8694)
  2. MarcoFalke added the label RPC/REST/ZMQ on Sep 21, 2016
  3. MarcoFalke added the label Wallet on Sep 21, 2016
  4. jonasschnelli commented at 1:07 pm on September 21, 2016: contributor

    I don’t like the coupling and the #ifdef ENABLE_WALLET in rpc/server.cpp|.h. I’d recommend to keep the CRPCRequestInfo wallet-free.

    I think we should pack the request path (URI) into the CRPCRequestInfo and or informations about the authentication (in case we want to distinct wallets based on authentication). Then I think there should be a method in wallet.cpp (or in rpcwallet.cpp) that maps a CWallet * pointer from a given URI, Auth-Info or the complete CRPCRequestInfo instance.

    Instead of the CWallet *& pwallet = reqinfo.wallet; there could be then something like CWallet *pwallet = CWallets::getWalletFromRequest(reqinfo)

  5. jonasschnelli commented at 1:09 pm on September 21, 2016: contributor
    General ConceptACK on a CRPCRequestInfo for the RPC table commands. Maybe it could also include the UniValue params and fHelp?
  6. in src/rpc/misc.cpp: in 041f4e06a6 outdated
    69@@ -70,7 +70,8 @@ UniValue getinfo(const UniValue& params, bool fHelp)
    70         );
    71 
    72 #ifdef ENABLE_WALLET
    73-    LOCK2(cs_main, pwalletMain ? &pwalletMain->cs_wallet : NULL);
    74+    CWallet *& pwallet = reqinfo.wallet;
    


    paveljanik commented at 4:17 pm on September 21, 2016:
    *&?

    luke-jr commented at 7:30 pm on September 21, 2016:
    Yes, pwallet is an alias to reqinfo.wallet which is of type CWallet*.
  7. luke-jr commented at 8:40 pm on September 21, 2016: member

    I think we should pack the request path (URI) into the CRPCRequestInfo and or informations about the authentication (in case we want to distinct wallets based on authentication). Then I think there should be a method in wallet.cpp (or in rpcwallet.cpp) that maps a CWallet * pointer from a given URI, Auth-Info or the complete CRPCRequestInfo instance.

    That sounds nice, but greatly complicates the implementation. :(

  8. luke-jr force-pushed on Oct 18, 2016
  9. luke-jr force-pushed on Oct 18, 2016
  10. MarcoFalke commented at 3:16 pm on October 19, 2016: member
    I think this can be closed after #8788?
  11. jonasschnelli commented at 3:28 pm on October 19, 2016: contributor
    Closing in favor of merged #8788
  12. jonasschnelli closed this on Oct 19, 2016

  13. luke-jr referenced this in commit b65bb4ea27 on Oct 20, 2016
  14. luke-jr referenced this in commit cb370e3d67 on Oct 20, 2016
  15. luke-jr referenced this in commit 06e4c90e24 on Oct 20, 2016
  16. laanwj reopened this on Oct 25, 2016

  17. luke-jr force-pushed on Oct 25, 2016
  18. luke-jr force-pushed on Oct 25, 2016
  19. luke-jr commented at 9:14 am on October 25, 2016: member
    Rebased and refactored based on @jonasschnelli ’s idea.
  20. laanwj commented at 11:18 am on October 25, 2016: member
    Makes sense, utACK ab5ce98
  21. in src/rpc/misc.cpp: in ab5ce98587 outdated
    25@@ -26,6 +26,8 @@
    26 
    27 using namespace std;
    28 
    29+CWallet *GetWalletForJSONRPCRequest(const JSONRPCRequest&);
    


    laanwj commented at 11:19 am on October 25, 2016:
    Not sure how this can pass the build w/ --disable-wallet, but this should be bracketed with #ifdef ENABLE_WALLET
  22. luke-jr force-pushed on Nov 12, 2016
  23. luke-jr force-pushed on Nov 12, 2016
  24. luke-jr commented at 1:44 am on November 12, 2016: member
    Rebased and addressed nit
  25. luke-jr renamed this:
    RPC refactoring: Never access wallet directly, only via new CRPCRequestInfo
    RPC refactoring: Access wallet using new GetWalletForJSONRPCRequest
    on Nov 12, 2016
  26. luke-jr force-pushed on Dec 29, 2016
  27. luke-jr referenced this in commit 41383dec86 on Dec 31, 2016
  28. instagibbs commented at 6:25 pm on January 4, 2017: member
    utACK 7de55733c5690350c48ec94660b5be56fbb5eb39
  29. luke-jr force-pushed on Jan 5, 2017
  30. luke-jr commented at 10:53 pm on January 5, 2017: member
    Minor change: Forward-declared CWallet even for non-wallet builds so it can be used in a pointer type, avoiding unnecessary casting.
  31. in src/rpc/rawtransaction.cpp: in e7f063cf8d outdated
    34@@ -35,6 +35,11 @@
    35 
    36 using namespace std;
    37 
    38+#ifdef ENABLE_WALLET
    39+std::string HelpRequiringPassphrase(CWallet *);
    


    TheBlueMatt commented at 5:10 pm on January 6, 2017:
    I’d kinda prefer we add another declaration outside of a header in an unrelated file…can we keep it in server.h and ifdef ENABLE_WALLET it?

    luke-jr commented at 5:15 pm on January 6, 2017:
    I suppose we could. But then it’s more likely to get used in new code (which I think we want to discourage?)

    TheBlueMatt commented at 5:17 pm on January 6, 2017:
    I’d think we can (and, more importantly, would) still nag people submitting PRs which add more uses of it outside of src/wallet/rpc*.
  32. in src/rpc/misc.cpp: in 5cc62b207e outdated
    25@@ -26,6 +26,10 @@
    26 
    27 using namespace std;
    28 
    29+#ifdef ENABLE_WALLET
    30+CWallet *GetWalletForJSONRPCRequest(const JSONRPCRequest&);
    


    TheBlueMatt commented at 5:18 pm on January 6, 2017:
    Here as well.
  33. in src/wallet/rpcdump.cpp: in 5cc62b207e outdated
    28@@ -29,6 +29,7 @@
    29 
    30 using namespace std;
    31 
    32+CWallet *GetWalletForJSONRPCRequest(const JSONRPCRequest&);
    33 void EnsureWalletIsUnlocked(CWallet *);
    34 bool EnsureWalletIsAvailable(CWallet *, bool avoidException);
    


    TheBlueMatt commented at 5:30 pm on January 6, 2017:
    Can we move these to some rpc.h in src/wallet? Why are we declaring functions in another file from the definition if they’re both in src/wallet???
  34. in src/wallet/rpcwallet.cpp: in 5cc62b207e outdated
    29@@ -30,6 +30,11 @@ using namespace std;
    30 int64_t nWalletUnlockTime;
    31 static CCriticalSection cs_nWalletUnlockTime;
    32 
    33+CWallet *GetWalletForJSONRPCRequest(const JSONRPCRequest& request)
    


    TheBlueMatt commented at 5:34 pm on January 6, 2017:
    Can you document this function somewhere (also probably move its definition to src/wallet/rpcwallet.h) - a few places in src/wallet assume it always returns non-NULL but this is not documented (I havent looked at the actual multi-wallet PR, but does this function then throw an RPC exception if you ask for a wallet that isnt loaded, or does it return NULL then)?
  35. luke-jr force-pushed on Jan 6, 2017
  36. luke-jr force-pushed on Jan 6, 2017
  37. gmaxwell commented at 3:18 pm on January 7, 2017: contributor

    So in some cases in the RPC you get the wallet pointer from json but then the check if it’s available is far below. This is begging for someone to insert code that uses a potentially null pointer between to two and doesn’t notice because their function doesn’t get tested with a missing wallet. I would recommend moving the creation of that local pointer down to the point where you’re going to test it.

    Alternatively or in addition, rename GetWalletForJSONRPCRequest to TryGetWalletForJSONRPCRequest and make GetWalletForJSONRPCRequest a wrapper for it that throws when it fails?

    Other than this nit that perhaps getting the pointer and testing it are too separated in some cases, utACK.

  38. luke-jr commented at 7:15 pm on January 7, 2017: member

    I liked the TryGetWalletForJSONRPCRequest/GetWalletForJSONRPCRequest refactor idea, but I don’t see any clean way to do it without changing the help behaviours.

    So I moved the one case EnsureWalletIsAvailable was delayed up, and removed the blank line between them and GetWalletForJSONRPCRequest.

  39. in src/wallet/rpcdump.cpp: in 6c25cf78a5 outdated
    149@@ -153,8 +150,8 @@ UniValue importprivkey(const JSONRPCRequest& request)
    150     return NullUniValue;
    151 }
    152 
    153-void ImportAddress(const CBitcoinAddress& address, const string& strLabel);
    154-void ImportScript(const CScript& script, const string& strLabel, bool isRedeemScript)
    155+void ImportAddress(CWallet*, const CBitcoinAddress& address, const string& strLabel);
    156+void ImportScript(CWallet * const pwallet, const CScript& script, const string& strLabel, bool isRedeemScript)
    


    TheBlueMatt commented at 9:49 pm on January 7, 2017:
    Note that there are a ton of uses of pwalletMain in ImportScript after the first commit (“RPC/Wallet: Pass CWallet as pointer to helper functions”) which are fixed in the next (“RPC: Do all wallet access through new GetWalletForJSONRPCRequest”) when they belong in the first.

    ryanofsky commented at 7:07 pm on February 27, 2017:

    Note that there are a ton of uses of pwalletMain in ImportScript after the first commit (“RPC/Wallet: Pass CWallet as pointer to helper functions”) which are fixed in the next (“RPC: Do all wallet access through new GetWalletForJSONRPCRequest”) when they belong in the first.

    I’m not seeing function signatures changes in c68b5a819282363282fa06724146494717882938 RPC: Do all wallet access through new GetWalletForJSONRPCRequest so the two commits do seem distinct currently.

  40. in src/wallet/rpcwallet.cpp: in 6c25cf78a5 outdated
    1128@@ -1126,7 +1129,7 @@ struct tallyitem
    1129     }
    1130 };
    1131 
    1132-UniValue ListReceived(const UniValue& params, bool fByAccounts)
    1133+UniValue ListReceived(CWallet * const pwallet, const UniValue& params, bool fByAccounts)
    


    TheBlueMatt commented at 10:16 pm on January 7, 2017:
    Note that there are a ton of uses of pwalletMain in ListReceived after the first commit (“RPC/Wallet: Pass CWallet as pointer to helper functions”) which are fixed in the next (“RPC: Do all wallet access through new GetWalletForJSONRPCRequest”) when they belong in the first.
  41. in src/wallet/rpcwallet.cpp: in 8bf69fde13 outdated
    2015@@ -2019,9 +2016,8 @@ UniValue walletpassphrase(const JSONRPCRequest& request)
    2016     pwallet->TopUpKeyPool();
    2017 
    2018     int64_t nSleepTime = request.params[1].get_int64();
    2019-    LOCK(cs_nWalletUnlockTime);
    2020-    nWalletUnlockTime = GetTime() + nSleepTime;
    2021-    RPCRunLater("lockwallet", boost::bind(LockWallet, pwallet), nSleepTime);
    2022+    pwallet->nRelockTime = GetTime() + nSleepTime;
    2023+    RPCRunLater(strprintf("lockwallet_%u", uintptr_t(pwallet)), boost::bind(LockWallet, pwallet), nSleepTime);
    


    TheBlueMatt commented at 11:01 pm on January 7, 2017:
    I super dont like the fact that the pointer to the wallet will end up in debug.log if you have debug=rpc enabled.

    ryanofsky commented at 7:55 pm on February 27, 2017:

    I super dont like the fact that the pointer to the wallet will end up in debug.log if you have debug=rpc enabled.

    Is fixed in later commit c42f3a5ac3235be127bd3a63454784c3d9a00b02 Wallet/RPC: Use filename rather than CWallet pointer, for lockwallet RPCRunLater job name

  42. in src/wallet/rpcwallet.cpp: in ddc1c76d5b outdated
    348@@ -340,8 +349,7 @@ UniValue getaddressesbyaccount(const JSONRPCRequest& request)
    349 
    350     // Find all addresses that have the given account
    351     UniValue ret(UniValue::VARR);
    352-    BOOST_FOREACH(const PAIRTYPE(CBitcoinAddress, CAddressBookData)& item, pwallet->mapAddressBook)
    353-    {
    354+    for (const PAIRTYPE(CBitcoinAddress, CAddressBookData)& item : pwallet->mapAddressBook) {
    


    TheBlueMatt commented at 11:07 pm on January 7, 2017:
    nit: I believe you can remove the PAIRTYPE and replace with std::pair since we’re not using BOOST_FOREACH now.
  43. in src/wallet/rpcwallet.cpp: in ddc1c76d5b outdated
    1240@@ -1219,8 +1241,7 @@ UniValue ListReceived(CWallet * const pwallet, const UniValue& params, bool fByA
    1241     // Reply
    1242     UniValue ret(UniValue::VARR);
    1243     map<string, tallyitem> mapAccountTally;
    1244-    BOOST_FOREACH(const PAIRTYPE(CBitcoinAddress, CAddressBookData)& item, pwallet->mapAddressBook)
    1245-    {
    1246+    for (const PAIRTYPE(CBitcoinAddress, CAddressBookData)& item : pwallet->mapAddressBook) {
    


    TheBlueMatt commented at 11:11 pm on January 7, 2017:
    nit: Here as well (no PAIRTYPE).
  44. in src/wallet/rpcwallet.cpp: in ddc1c76d5b outdated
    1664@@ -1635,14 +1665,14 @@ UniValue listaccounts(const JSONRPCRequest& request)
    1665             includeWatchonly = includeWatchonly | ISMINE_WATCH_ONLY;
    1666 
    1667     map<string, CAmount> mapAccountBalances;
    1668-    BOOST_FOREACH(const PAIRTYPE(CTxDestination, CAddressBookData)& entry, pwallet->mapAddressBook) {
    1669-        if (IsMine(*pwallet, entry.first) & includeWatchonly) // This address belongs to me
    1670+    for (const PAIRTYPE(CTxDestination, CAddressBookData)& entry : pwallet->mapAddressBook) {
    


    TheBlueMatt commented at 11:12 pm on January 7, 2017:
    nit: Here as well (no PAIRTYPE).
  45. TheBlueMatt commented at 11:30 pm on January 7, 2017: member

    Please do not tag the 4th commit “Trivial”. We usually define trivial as doesnt touch any code.

    As for the 6th commit: please do not do this. nothing in src/wallet is built when ENABLE_WALLET is off, so generally src/wallet/* should never be included outside of src/wallet/*

    Aside from the (partial-revert) of “Move wallet RPC declarations to rpcwallet.h” and the printing of the raw pointers to debug log, this looks good to me at d9aff6e322fd4cdba8d338d304a627af46feb7eb.

  46. gmaxwell commented at 8:36 am on January 8, 2017: contributor
    @luke-jr Looks good to me, will test as soon as you update for matt’s latest comments.
  47. luke-jr force-pushed on Jan 8, 2017
  48. luke-jr force-pushed on Jan 8, 2017
  49. luke-jr commented at 9:17 pm on January 8, 2017: member
    Made changes requested by @TheBlueMatt, and rebased to resolve conflict. Also includes a quick sanity check that -wallet doesn’t include path separators.
  50. TheBlueMatt commented at 4:59 pm on January 9, 2017: member
    While you’re at it, can you call SanitizeString (in addition to the “/\” check) on the wallet param?
  51. luke-jr force-pushed on Jan 9, 2017
  52. TheBlueMatt commented at 6:03 pm on January 9, 2017: member
    utACK 7d1228bf7f1c398d9fcda6161e6aebfc5e5e3700
  53. gmaxwell commented at 10:12 pm on January 11, 2017: contributor
    Needs rebase.
  54. luke-jr force-pushed on Jan 12, 2017
  55. gmaxwell commented at 6:34 am on January 12, 2017: contributor
    ACK.
  56. fanquake commented at 1:04 pm on January 12, 2017: member
    Needs rebasing again.
  57. luke-jr force-pushed on Jan 12, 2017
  58. luke-jr commented at 4:57 pm on January 12, 2017: member
    Rebased yet again.
  59. gmaxwell commented at 4:48 am on January 15, 2017: contributor
    still ACK
  60. luke-jr force-pushed on Feb 3, 2017
  61. luke-jr force-pushed on Feb 6, 2017
  62. in src/wallet/wallet.cpp: in 5093d41c66 outdated
    3739@@ -3740,6 +3740,12 @@ bool CWallet::InitLoadWallet()
    3740 
    3741     std::string walletFile = GetArg("-wallet", DEFAULT_WALLET_DAT);
    


    BlockMechanic commented at 11:42 pm on February 16, 2017:
    Should this not be “count” i.e for multiple wallet files to be created ? Adding perhaps a for loop to iterate over required num of wallets?

    luke-jr commented at 11:46 pm on February 16, 2017:
    No, because this PR is not multiwallet…
  63. luke-jr force-pushed on Feb 17, 2017
  64. luke-jr force-pushed on Feb 25, 2017
  65. luke-jr force-pushed on Feb 27, 2017
  66. luke-jr force-pushed on Feb 27, 2017
  67. luke-jr force-pushed on Feb 27, 2017
  68. luke-jr force-pushed on Feb 27, 2017
  69. luke-jr force-pushed on Feb 27, 2017
  70. luke-jr force-pushed on Feb 27, 2017
  71. luke-jr force-pushed on Feb 27, 2017
  72. luke-jr force-pushed on Feb 27, 2017
  73. luke-jr force-pushed on Feb 27, 2017
  74. in src/rpc/misc.cpp: in f757a41d79 outdated
    111@@ -112,13 +112,17 @@ UniValue getinfo(const JSONRPCRequest& request)
    112 class DescribeAddressVisitor : public boost::static_visitor<UniValue>
    113 {
    114 public:
    115+    CWallet * const pwallet;
    


    ryanofsky commented at 7:00 pm on February 27, 2017:
    Seems like this could be a pointer to a const CWallet. Same for some other cases. Would suggest using const CWallet* instead of CWallet* where possible for more safety and clarity.
  75. in src/rpc/server.h: in f757a41d79 outdated
    202+// Needed even with !ENABLE_WALLET, to pass (ignored) pointers around
    203+class CWallet;
    204+
    205+#ifdef ENABLE_WALLET
    206+// New code should accessing the wallet should be under the ../wallet/ directory
    207+std::string HelpRequiringPassphrase(CWallet *);
    


    ryanofsky commented at 7:29 pm on February 27, 2017:
    Maybe squash commit 6033b43f8cfd612da436c73ff0508a00a8fb0dd5 Move wallet RPC declarations to rpcwallet.h into commit f757a41d7959f1ef5740c57b712fb3b89f233dcd RPC/Wallet: Pass CWallet as pointer to helper functions, to just add to right place instead of adding and moving.
  76. luke-jr force-pushed on Feb 27, 2017
  77. in src/rpc/misc.cpp: in c68b5a8192 outdated
    83@@ -82,9 +84,9 @@ UniValue getinfo(const JSONRPCRequest& request)
    84     obj.push_back(Pair("version", CLIENT_VERSION));
    85     obj.push_back(Pair("protocolversion", PROTOCOL_VERSION));
    86 #ifdef ENABLE_WALLET
    87-    if (pwalletMain) {
    88-        obj.push_back(Pair("walletversion", pwalletMain->GetVersion()));
    89-        obj.push_back(Pair("balance",       ValueFromAmount(pwalletMain->GetBalance())));
    90+    if (pwallet) {
    


    ryanofsky commented at 7:50 pm on February 27, 2017:
    Note to reviewers: This commit (d77ad6d41666b4c41abe1ba3b63300df1903643e RPC: Do all wallet access through new GetWalletForJSONRPCRequest) is trivial to review if you configure your diff tool to ignore the pwallet->pwalletmain renames (much shorter and no changed lines, only inserted).
  78. in src/wallet/rpcwallet.cpp: in 8a1a794ec0 outdated
    2059@@ -2063,9 +2060,8 @@ UniValue walletpassphrase(const JSONRPCRequest& request)
    2060     pwallet->TopUpKeyPool();
    2061 
    2062     int64_t nSleepTime = request.params[1].get_int64();
    2063-    LOCK(cs_nWalletUnlockTime);
    


    ryanofsky commented at 7:57 pm on February 27, 2017:
    Is the syncrhonization not needed anymore?
  79. in src/rpc/misc.cpp: in 09f3076769 outdated
    100@@ -101,8 +101,9 @@ UniValue getinfo(const JSONRPCRequest& request)
    101         obj.push_back(Pair("keypoololdest", pwallet->GetOldestKeyPoolTime()));
    102         obj.push_back(Pair("keypoolsize",   (int)pwallet->GetKeyPoolSize()));
    103     }
    104-    if (pwallet && pwallet->IsCrypted())
    105+    if (pwallet && pwallet->IsCrypted()) {
    


    ryanofsky commented at 7:59 pm on February 27, 2017:
    Commit 09f30767695fd585b68fa100d770c9a0a4209b51 Reformat touched lines with C++11 looks fine, but it doesn’t appear that these changes have anything to do with C++11. Maybe clarify commit message.
  80. in src/rpc/misc.cpp: in 6033b43f8c outdated
    234@@ -234,6 +235,9 @@ UniValue validateaddress(const JSONRPCRequest& request)
    235     return ret;
    236 }
    237 
    238+// Needed even with !ENABLE_WALLET, to pass (ignored) pointers around
    239+class CWallet;
    


    ryanofsky commented at 8:21 pm on February 27, 2017:
    This doesn’t actually seem to be needed since CWallet is also forward declared in init.h, but maybe it is better to keep it.
  81. luke-jr force-pushed on Feb 27, 2017
  82. luke-jr force-pushed on Feb 27, 2017
  83. RPC/Wallet: Pass CWallet as pointer to helper functions eca550f250
  84. RPC: Do all wallet access through new GetWalletForJSONRPCRequest d77ad6d416
  85. Move nWalletUnlockTime to CWallet::nRelockTime, and name timed task unique per CWallet 2e518e313b
  86. Reformat touched lines with C++11 bf8a04a165
  87. RPC: Pass on JSONRPCRequest metadata (URI/user/etc) for "help" method ad1573472e
  88. Move wallet RPC declarations to rpcwallet.h a4356328e0
  89. More tightly couple EnsureWalletIsAvailable with GetWalletForJSONRPCRequest where appropriate 86be48a77c
  90. Wallet/RPC: Use filename rather than CWallet pointer, for lockwallet RPCRunLater job name
    The job name is logged, and could pose as an information leak to someone attacking the process, helping them counteract ASLR protections
    9756be382e
  91. Wallet: Sanitise -wallet parameter d678771c66
  92. luke-jr force-pushed on Feb 27, 2017
  93. ryanofsky commented at 9:00 pm on February 27, 2017: member
    utACK d678771c660c936a6222dd43a204cb2699100f3e
  94. laanwj assigned laanwj on Mar 2, 2017
  95. jonasschnelli commented at 7:28 pm on March 2, 2017: contributor
    Great PR. I think we should get this in as soon as possible. utACK d678771c660c936a6222dd43a204cb2699100f3e
  96. laanwj commented at 12:38 pm on March 3, 2017: member
    utACK d678771
  97. laanwj merged this on Mar 3, 2017
  98. laanwj closed this on Mar 3, 2017

  99. laanwj referenced this in commit eb281842b7 on Mar 3, 2017
  100. fanquake moved this from the "In progress" to the "Done" column in a project

  101. luke-jr referenced this in commit 5bd40ce055 on Mar 7, 2017
  102. luke-jr referenced this in commit e6aa16cac0 on Mar 7, 2017
  103. luke-jr referenced this in commit b7adec2da7 on Mar 7, 2017
  104. luke-jr referenced this in commit 212a0f5a99 on Mar 7, 2017
  105. luke-jr referenced this in commit 9283eaf97c on Mar 7, 2017
  106. luke-jr referenced this in commit 211520703c on Mar 7, 2017
  107. luke-jr referenced this in commit 7a5499c771 on Mar 7, 2017
  108. luke-jr referenced this in commit 94964a31c2 on Mar 7, 2017
  109. luke-jr referenced this in commit 6689b85688 on Mar 7, 2017
  110. jtimon commented at 8:31 pm on March 23, 2017: contributor
    By the way, I reviewed this partially after merged when rebasing #9845 (making it mostly pointless since most was done here already).
  111. PastaPastaPasta referenced this in commit 884279a6f7 on Dec 29, 2018
  112. PastaPastaPasta referenced this in commit 2d8a771801 on Dec 30, 2018
  113. PastaPastaPasta referenced this in commit 5c03749204 on Dec 30, 2018
  114. PastaPastaPasta referenced this in commit bf939b6eb3 on Dec 30, 2018
  115. PastaPastaPasta referenced this in commit 9cb360e773 on Dec 30, 2018
  116. PastaPastaPasta referenced this in commit 54ddffc6ec on Dec 30, 2018
  117. PastaPastaPasta referenced this in commit 5dd9946528 on Dec 30, 2018
  118. PastaPastaPasta referenced this in commit 6fff6754c4 on Dec 30, 2018
  119. PastaPastaPasta referenced this in commit 3d8aa0c15c on Dec 30, 2018
  120. PastaPastaPasta referenced this in commit 19aaaeaac5 on Dec 30, 2018
  121. PastaPastaPasta referenced this in commit ae6857e94e on Dec 30, 2018
  122. PastaPastaPasta referenced this in commit 8a291608a8 on Dec 30, 2018
  123. PastaPastaPasta referenced this in commit be0fc823e7 on Dec 30, 2018
  124. PastaPastaPasta referenced this in commit 7a206cf1cb on Dec 30, 2018
  125. PastaPastaPasta referenced this in commit 84626a9506 on Dec 30, 2018
  126. PastaPastaPasta referenced this in commit 2292143896 on Dec 31, 2018
  127. PastaPastaPasta referenced this in commit b0af0712a5 on Dec 31, 2018
  128. PastaPastaPasta referenced this in commit 8f310cac91 on Dec 31, 2018
  129. PastaPastaPasta referenced this in commit 461b559467 on Dec 31, 2018
  130. PastaPastaPasta referenced this in commit 1cae76176b on Dec 31, 2018
  131. PastaPastaPasta referenced this in commit 0459aba396 on Dec 31, 2018
  132. PastaPastaPasta referenced this in commit cccea88376 on Dec 31, 2018
  133. PastaPastaPasta referenced this in commit 279980e0bb on Dec 31, 2018
  134. PastaPastaPasta referenced this in commit 0ab1cac862 on Dec 31, 2018
  135. PastaPastaPasta referenced this in commit 5d1d4ed09a on Dec 31, 2018
  136. PastaPastaPasta referenced this in commit 477eef0a74 on Dec 31, 2018
  137. PastaPastaPasta referenced this in commit b8345b6f9e on Dec 31, 2018
  138. PastaPastaPasta referenced this in commit e82a91e873 on Dec 31, 2018
  139. PastaPastaPasta referenced this in commit c42b215296 on Dec 31, 2018
  140. PastaPastaPasta referenced this in commit 588b83fc8d on Dec 31, 2018
  141. PastaPastaPasta referenced this in commit b5a27985c6 on Jan 2, 2019
  142. PastaPastaPasta referenced this in commit 8408587316 on Jan 2, 2019
  143. PastaPastaPasta referenced this in commit f2f14e49bc on Jan 2, 2019
  144. PastaPastaPasta referenced this in commit 8d3008e220 on Jan 2, 2019
  145. PastaPastaPasta referenced this in commit 0b8cdbbfda on Jan 2, 2019
  146. PastaPastaPasta referenced this in commit b03711f3a9 on Jan 2, 2019
  147. PastaPastaPasta referenced this in commit b030576f7a on Jan 3, 2019
  148. PastaPastaPasta referenced this in commit eaa22e7ffe on Jan 3, 2019
  149. PastaPastaPasta referenced this in commit 03379e3b34 on Jan 3, 2019
  150. PastaPastaPasta referenced this in commit aa239eb134 on Jan 21, 2019
  151. PastaPastaPasta referenced this in commit 51f26b58c5 on Jan 21, 2019
  152. PastaPastaPasta referenced this in commit e0c8383b39 on Jan 21, 2019
  153. PastaPastaPasta referenced this in commit 96fcbf3420 on Jan 25, 2019
  154. PastaPastaPasta referenced this in commit d9ffe4e925 on Jan 25, 2019
  155. PastaPastaPasta referenced this in commit 7aeaa4bf87 on Jan 25, 2019
  156. PastaPastaPasta referenced this in commit 87af117811 on Jan 25, 2019
  157. PastaPastaPasta referenced this in commit c094d4bbe6 on Jan 25, 2019
  158. PastaPastaPasta referenced this in commit c70aa60792 on Jan 25, 2019
  159. adneerav commented at 7:39 am on February 5, 2019: none

    Hello @luke-jr ,

    Is there any way where we can increase the number of wallets to be in loaded state at same time.As rightnow its like if I load wallet more than 100 or 150 daemon is getting crashed/stopped. I am trying to load/unload wallet dynamically using RPC.

    What i tried is incraesing the set_lk_max_lockers to 400000 and also added set_lg_regionmax 1048576 But still same things I am facing.

    Reflink for above setup : https://docs.oracle.com/cd/E17276_01/html/api_reference/C/set_lk_max_lockers_parameter.html https://bitcoin.stackexchange.com/a/70737

    So is there any way or configuration or any changes which can increase and allow more number of wallets to be loaded ?

  160. random-zebra referenced this in commit 096a0f9640 on May 17, 2021
  161. MarcoFalke locked this on Dec 16, 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-07-05 19:13 UTC

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