Make CKeyStore an interface #12762

pull promag wants to merge 2 commits into bitcoin:master from promag:2018-03-keystore changing 3 files +4 −9
  1. promag commented at 1:18 AM on March 23, 2018: member

    Made these simplifications while reviewing #12714. This aims to make CKeyStore a pure interface:

    • no variable members - the mutex is moved to CBasicKeyStore which is where it is used;
    • no method implementations - AddKey(const CKey &) is moved to CBasicKeyStore which is where it is needed.
  2. fanquake added the label Refactoring on Mar 23, 2018
  3. in src/keystore.h:21 in 4af2dcc867 outdated
      16 | @@ -17,15 +17,11 @@
      17 |  /** A virtual base class for key stores */
      18 |  class CKeyStore
      19 |  {
      20 | -protected:
      21 | -    mutable CCriticalSection cs_KeyStore;
      22 | -
      23 |  public:
      24 |      virtual ~CKeyStore() {}
    


    Empact commented at 8:49 AM on March 23, 2018:

    Destructor should also be pure?


    promag commented at 12:08 PM on March 24, 2018:
  4. Empact commented at 8:49 AM on March 23, 2018: member

    FYI there's a comment in the developer-notes.md that links cs_KeyStore to CKeyStore

  5. promag force-pushed on Mar 24, 2018
  6. promag commented at 12:06 PM on March 24, 2018: member

    Rebased on top of #12772 to check if make check finishes successfully.

  7. promag force-pushed on Mar 24, 2018
  8. promag commented at 12:10 PM on March 24, 2018: member

    @Empact updated developer notes, thanks.

  9. Inline CKeyStore::AddKey(const CKey &) in CBasicKeyStore 25eb9f5020
  10. Move CKeyStore::cs_KeyStore to CBasicKeyStore f381299d64
  11. promag force-pushed on Mar 24, 2018
  12. promag commented at 12:16 PM on March 24, 2018: member

    Rebased on top of master because meanwhile #12772 was merged.

  13. sipa commented at 7:55 PM on March 24, 2018: member

    utACK f381299d64784c60cda30be48ea30a6469f05d35

  14. laanwj commented at 5:04 PM on March 27, 2018: member

    Made these simplifications while reviewing #12714.

    Should this go in before or after that PR?

  15. promag commented at 5:08 PM on March 27, 2018: member

    @laanwj either way.

  16. sipa commented at 5:16 PM on March 27, 2018: member

    I'll happily rebase #12714 if this goes in first.

  17. promag commented at 5:22 PM on March 27, 2018: member

    I'll gladly rebase this if #12714 goes first :)

  18. laanwj commented at 6:37 PM on March 27, 2018: member

    utACK f381299d64784c60cda30be48ea30a6469f05d35, doesn't look like rebasing is necessary.

  19. laanwj merged this on Mar 27, 2018
  20. laanwj closed this on Mar 27, 2018

  21. laanwj referenced this in commit e49ba2e23b on Mar 27, 2018
  22. Fabcien referenced this in commit f1d523c998 on Aug 30, 2019
  23. PastaPastaPasta referenced this in commit 4b866e6380 on Sep 27, 2020
  24. PastaPastaPasta referenced this in commit c85c34e557 on Oct 22, 2020
  25. PastaPastaPasta referenced this in commit c902e6075d on Oct 27, 2020
  26. 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-19 12:15 UTC

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