0.17: Backport #14453 #14880

pull promag wants to merge 2 commits into bitcoin:0.17 from promag:2018-12-backport-14453 changing 2 files +21 −8
  1. promag commented at 11:21 PM on December 5, 2018: member

    Backport #14453 to 0.17

  2. rpc: Fix wallet unload during walletpassphrase timeout
    Github-Pull: #14453
    Rebased-From: 321decf
    75b5d8c4ea
  3. fanquake added the label Backport on Dec 5, 2018
  4. fanquake added this to the milestone 0.17.1 on Dec 5, 2018
  5. promag commented at 1:42 AM on December 6, 2018: member

    In 0.17 branch encryptwallet stops the node, which changed in #12493. For that reason the test is adjusted.

  6. in src/wallet/rpcwallet.cpp:2622 in 31e657b4f2 outdated
    2614 | @@ -2622,7 +2615,18 @@ static UniValue walletpassphrase(const JSONRPCRequest& request)
    2615 |      pwallet->TopUpKeyPool();
    2616 |  
    2617 |      pwallet->nRelockTime = GetTime() + nSleepTime;
    2618 | -    RPCRunLater(strprintf("lockwallet(%s)", pwallet->GetName()), std::bind(LockWallet, pwallet), nSleepTime);
    2619 | +
    2620 | +    // Keep a weak pointer to the wallet so that it is possible to unload the
    2621 | +    // wallet before the following callback is called. If a valid shared pointer
    2622 | +    // is acquired in the callback then the wallet is still loaded.
    2623 | +    std::weak_ptr<CWallet> weak_wallet = wallet;
    


    Empact commented at 9:15 AM on December 6, 2018:

    laanwj commented at 10:53 AM on December 6, 2018:

    I don't think this is an appropriate comment for a backport as this change exists literally in the commit for master: https://github.com/bitcoin/bitcoin/pull/14453/commits/321decffa1fbf213462d97e5372bd0c4eeb99635

  7. qa: Ensure wallet unload during walletpassphrase timeout
    0.17 branch doesn't include #12493 which changed encryptwallet behavior. For that
    reason the test is adjusted.
    
    Github-Pull: #14453
    Rebased-From: 8907df9
    dcb032dcdf
  8. promag force-pushed on Dec 6, 2018
  9. laanwj commented at 2:23 PM on December 6, 2018: member

    utACK dcb032dcdf8e8300a84ae8ec6cfde0da5381f56f

  10. MarcoFalke commented at 6:06 PM on December 6, 2018: member

    utACK dcb032dcdf8e8300a84ae8ec6cfde0da5381f56f

  11. MarcoFalke merged this on Dec 6, 2018
  12. MarcoFalke closed this on Dec 6, 2018

  13. MarcoFalke referenced this in commit abae8aeff1 on Dec 6, 2018
  14. MarcoFalke 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-13 15:15 UTC

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