Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/Makefile.test.include
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ BITCOIN_TESTS =\
test/crypto_tests.cpp \
test/cuckoocache_tests.cpp \
test/DoS_tests.cpp \
test/evo_deterministicmns_tests.cpp \
test/evo_simplifiedmns_tests.cpp \
test/getarg_tests.cpp \
test/governance_validators_tests.cpp \
test/hash_tests.cpp \
Expand Down
9 changes: 9 additions & 0 deletions src/evo/simplifiedmns.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,15 @@ void CSimplifiedMNListEntry::ToJson(UniValue& obj) const
obj.push_back(Pair("isValid", isValid));
}

CSimplifiedMNList::CSimplifiedMNList(const std::vector<CSimplifiedMNListEntry>& smlEntries)
{
mnList = smlEntries;

std::sort(mnList.begin(), mnList.end(), [&](const CSimplifiedMNListEntry& a, const CSimplifiedMNListEntry& b) {
return a.proRegTxHash.Compare(b.proRegTxHash) < 0;
});
}

CSimplifiedMNList::CSimplifiedMNList(const CDeterministicMNList& dmnList)
{
mnList.reserve(dmnList.all_count());
Expand Down
1 change: 1 addition & 0 deletions src/evo/simplifiedmns.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ class CSimplifiedMNList

public:
CSimplifiedMNList() {}
CSimplifiedMNList(const std::vector<CSimplifiedMNListEntry>& smlEntries);
CSimplifiedMNList(const CDeterministicMNList& dmnList);

uint256 CalcMerkleRoot(bool *pmutated = NULL) const;
Expand Down
Loading