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 12, 2023
1 parent 2f05059 commit 72f0ad2
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 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 Expand Up @@ -221,7 +222,7 @@ class PopSchemeMPL : public CoreMPL {
/**
* This scheme reflects the Sign/Verify behaviour of older bls-signatures library versions (<0.1.29).
*/
class LegacySchemeMPL : public CoreMPL {
class LegacySchemeMPL final : public CoreMPL {

public:
LegacySchemeMPL() : CoreMPL(std::string{}) {}
Expand Down

0 comments on commit 72f0ad2

Please sign in to comment.