rpcwallet: use EnsureWalletIsUnlocked() where possible #3177

pull Diapolo wants to merge 1 commits into bitcoin:master from Diapolo:RPC changing 1 files +8 −10
  1. Diapolo commented at 11:01 AM on October 28, 2013: none
    • replaces pwalletMain->IsLocked() checks, which mostly did not even throw an error
    • in keypoolrefill init kpSize to 0 as we have the logic to determine max kpSize in pwalletMain->TopUpKeyPool() anyway
  2. rpcwallet: use EnsureWalletIsUnlocked() where possible
    - replaces pwalletMain->IsLocked() checks, which mostly did not even throw
      an error
    - in keypoolrefill init kpSize to 0 as we have the logic to determine max
      kpSize in pwalletMain->TopUpKeyPool() anyway
    d3c6a86f43
  3. BitcoinPullTester commented at 11:30 AM on October 28, 2013: none

    Automatic sanity-testing: FAILED BUILD/TEST, see http://jenkins.bluematt.me/pull-tester/d3c6a86f43c9142ffedc8a74b255bbfd40c52915 for binaries and test log.

    This could happen for one of several reasons:

    1. It chanages paths in makefile.linux-mingw or otherwise changes build scripts in a way that made them incompatible with the automated testing scripts (please tweak those patches in qa/pull-tester)
    2. It adds/modifies tests which test network rules (thanks for doing that), which conflicts with a patch applied at test time
    3. It does not build on either Linux i386 or Win32 (via MinGW cross compile)
    4. The test suite fails on either Linux i386 or Win32
    5. The block test-cases failed (lookup the first bNN identifier which failed in https://github.com/TheBlueMatt/test-scripts/blob/master/FullBlockTestGenerator.java)

    If you believe this to be in error, please ping BlueMatt on freenode or TheBlueMatt here.

    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.

  4. in src/rpcwallet.cpp:None in d3c6a86f43
     108 | @@ -109,8 +109,8 @@ Value getnewaddress(const Array& params, bool fHelp)
     109 |      if (params.size() > 0)
     110 |          strAccount = AccountFromValue(params[0]);
     111 |  
     112 | -    if (!pwalletMain->IsLocked())
     113 | -        pwalletMain->TopUpKeyPool();
     114 | +    EnsureWalletIsUnlocked();
    


    laanwj commented at 11:45 AM on October 28, 2013:

    You're changing the meaning here. It was: top up keypool if wallet is already unlocked. Now you're changing it to always make sure the wallet is unlocked and then always topping up the key pool. This makes it impossible to request addresses without giving the passphrase, even if enough addresses are available.


    Diapolo commented at 11:54 AM on October 28, 2013:

    Seems I should take a Bitcoin break...


    laanwj commented at 12:10 PM on October 28, 2013:

    Especially when proposing changes to the core try to focus on changes that fix issues. Otherwise it costs a lot of reviewing bandwidth (which is already very limited) and we're not really making progress. As for a break, well yes its sometimes a good idea to get some rest!

  5. Diapolo closed this on Oct 28, 2013

  6. Diapolo deleted the branch on Oct 28, 2013
  7. Bushstar referenced this in commit 64a913d6f9 on Apr 8, 2020
  8. 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-21 18:16 UTC

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