Skip to content

Commit

Permalink
fix: add missing destructor for CoreMPL and final for nested classes (C…
Browse files Browse the repository at this point in the history
…hia-Network#371)

Signing commit from @knst from Chia-Network#359

Co-authored-by: Konstantin Akimov <545784+knst@users.noreply.github.com>
  • Loading branch information
2 people authored and UdjinM6 committed Jun 10, 2023
1 parent 2f05059 commit 19cabd7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions include/dashbls/schemes.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class CoreMPL {
public:
CoreMPL() = delete;
CoreMPL(const std::string& strId) : strCiphersuiteId(strId) {}
virtual ~CoreMPL() {}
// Generates a private key from a seed, similar to HD key generation
// (hashes the seed), and reduces it mod the group order
virtual PrivateKey KeyGen(const vector<uint8_t>& seed);
Expand Down Expand Up @@ -112,7 +113,7 @@ class CoreMPL {
bool fLegacy);
};

class BasicSchemeMPL : public CoreMPL {
class BasicSchemeMPL final : public CoreMPL {
public:
static const std::string CIPHERSUITE_ID;
BasicSchemeMPL() : CoreMPL(BasicSchemeMPL::CIPHERSUITE_ID) {}
Expand All @@ -133,7 +134,7 @@ class BasicSchemeMPL : public CoreMPL {
const G2Element& signature) override;
};

class AugSchemeMPL : public CoreMPL {
class AugSchemeMPL final : public CoreMPL {

public:
static const std::string CIPHERSUITE_ID;
Expand Down Expand Up @@ -186,7 +187,7 @@ class AugSchemeMPL : public CoreMPL {
const G2Element& signature) override;
};

class PopSchemeMPL : public CoreMPL {
class PopSchemeMPL final : public CoreMPL {

public:
static const std::string CIPHERSUITE_ID;
Expand Down

0 comments on commit 19cabd7

Please sign in to comment.