Remove redundant pre-TopUpKeypool check #16361

pull instagibbs wants to merge 1 commits into bitcoin:master from instagibbs:redundant_topup changing 1 files +6 −10
  1. instagibbs commented at 2:13 PM on July 9, 2019: member

    TopUpKeypool already has a quick check for IsLocked()

  2. fanquake added the label RPC/REST/ZMQ on Jul 9, 2019
  3. fanquake added the label Wallet on Jul 9, 2019
  4. instagibbs force-pushed on Jul 9, 2019
  5. MarcoFalke added the label Refactoring on Jul 9, 2019
  6. MarcoFalke commented at 2:57 PM on July 9, 2019: member

    ACK d40a642c14e4533d74ccd41daae6bcc0734501e0, but could fix the coding style in the wallet method, so that the commit can be reviewed by only looking at the diff:

    diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
    index 097b92a262..084ec4599d 100644
    --- a/src/wallet/wallet.cpp
    +++ b/src/wallet/wallet.cpp
    @@ -3423,8 +3423,7 @@ bool CWallet::TopUpKeyPool(unsigned int kpSize)
         {
             LOCK(cs_wallet);
     
    -        if (IsLocked())
    -            return false;
    +        if (IsLocked()) return false;
     
             // Top up key pool
             unsigned int nTargetSize;
    
  7. instagibbs force-pushed on Jul 9, 2019
  8. instagibbs commented at 3:03 PM on July 9, 2019: member

    good call @MarcoFalke , done

  9. MarcoFalke commented at 3:13 PM on July 9, 2019: member

    ACK d75d64b747c1cfca1e203755bdef50c017536bec, only looked at the diff

    <details><summary>Show signature and timestamp</summary>

    Signature:

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA512
    
    ACK d75d64b747c1cfca1e203755bdef50c017536bec, only looked at the diff
    -----BEGIN PGP SIGNATURE-----
    
    iQGzBAEBCgAdFiEE+rVPoUahrI9sLGYTzit1aX5ppUgFAlwqrYAACgkQzit1aX5p
    pUhNcwv9GUeiQtaJceUbojPSDPITC/bWmmpQsHHM/smh7Cfg2DvzwDChsilo9aU5
    nTWcak7EB/veBx3jy0V1uBcVSJiaF9SMgNX2AnjauA4Y8ShEAEex6HhykB1UsViu
    3nHJRfDSfOyQw67H7dW0pnKosAmI1RIQVEsY+o51RQKIaDUQdFveefgZXo9i3VoH
    h29eNUwxXqxbC8KK8wyOIeWu+Ej25Kvjqv+TRM9qQpCwj4I0JTREideGksxfAA0s
    34BTZBluxOPWvjlbPgOmFaEa7zbfeL/VuEMXdGtPkLc1pXHv7P5KJ+ES1lMiBtVw
    tVSF8Ob5AOA203y8WC/EfVC70UGDO64OI2SnxgkZ/LB2C+1bh9kG+AWHtk69p2Wj
    CGmqCATo1fOEdg+BOIl8IagPdDh0Ws5YLVgs+wr1QyJiklzsgSzQAugBnn8dDKIf
    KzP8e5+OkK8jYUnBGtCkAVdAcjqUFvexWge6QQgjXFa4LJ2nMrOLihNzyL0iYNET
    RGMrkdbG
    =kvZO
    -----END PGP SIGNATURE-----
    

    Timestamp of file with hash dfcc5bf7dc7fdef37456ef6b7a38e94248b574e921682dbc041268e79e939ed4 -

    </details>

  10. DrahtBot commented at 4:35 PM on July 9, 2019: member

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #16341 (WIP: Introduce ScriptPubKeyMan interface and use it for key and script management (aka wallet boxes) by achow101)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  11. DrahtBot added the label Needs rebase on Jul 10, 2019
  12. DrahtBot commented at 11:31 AM on July 10, 2019: member

    <!--cf906140f33d8803c4a75a2196329ecb-->Needs rebase

  13. instagibbs force-pushed on Jul 10, 2019
  14. instagibbs renamed this:
    Remove redundant pre-TopUpKeypool checks
    Remove redundant pre-TopUpKeypool check
    on Jul 10, 2019
  15. instagibbs commented at 1:20 PM on July 10, 2019: member

    Down to one check change due to s/key/destination/ refactoring merged in master.

  16. fanquake removed the label Needs rebase on Jul 10, 2019
  17. MarcoFalke commented at 1:28 PM on July 10, 2019: member

    Down to one check change due to s/key/destination/ refactoring merged in master.

    Are you sure? I think they just have been moved elsewhere.

  18. Remove redundant pre-TopUpKeypool checks 96b6dd468a
  19. instagibbs force-pushed on Jul 10, 2019
  20. instagibbs commented at 1:40 PM on July 10, 2019: member

    @MarcoFalke you'd think since I reviewed the responsible PR I would have known, but no I was wrong :) updated.

  21. achow101 commented at 3:31 PM on July 10, 2019: member

    ACK 96b6dd468a4cb6077d1a2267d620d99d39aac7d0 Reviewed the diff and checked that the if (!IsLocked()) TopUpKeypool() pattern is changed everywhere.

  22. MarcoFalke referenced this in commit ff0aad8a40 on Jul 10, 2019
  23. MarcoFalke merged this on Jul 10, 2019
  24. MarcoFalke closed this on Jul 10, 2019

  25. Munkybooty referenced this in commit fd890ed8ab on Nov 4, 2021
  26. Munkybooty referenced this in commit 8c9b049e06 on Nov 6, 2021
  27. Munkybooty referenced this in commit 5f77854558 on Nov 12, 2021
  28. Munkybooty referenced this in commit c6a0b75971 on Nov 16, 2021
  29. Munkybooty referenced this in commit a22eb0938b on Nov 18, 2021
  30. Munkybooty referenced this in commit 21dd6ec656 on Nov 24, 2021
  31. Munkybooty referenced this in commit 256b790a9a on Nov 30, 2021
  32. Munkybooty referenced this in commit 0feb04ab6f on Nov 30, 2021
  33. 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: 2026-04-13 15:14 UTC

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