Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/0.20' into 0.21
Browse files Browse the repository at this point in the history
  • Loading branch information
lostystyg committed Aug 11, 2022
2 parents cc77fdc + 4284cfa commit ffc9247
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 17 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build & Deploy Release Draft

on:
push:
tags: v*.*.*
tags: '*.*.*'

permissions:
contents: read
Expand Down Expand Up @@ -157,4 +157,4 @@ jobs:
# with:
# name: bastyon.tgz
# - name: Unpack artifact
# run: tar xzf bastyon.tgz -C /data/gui/ --no-same-owner
# run: tar xzf bastyon.tgz -C /data/gui/ --no-same-owner
4 changes: 2 additions & 2 deletions src/chainparams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,10 @@ class CMainParams : public CChainParams
consensus.nHeight_version_1_0_0 = 108300;

// The best chain should have at least this much work.
consensus.nMinimumChainWork = uint256S("0x00000000000000000000000000000000000000000000003e0ce94c0f07fc1cea"); // 1761588
consensus.nMinimumChainWork = uint256S("0x000000000000000000000000000000000000000000000042562b809c77f04d32"); // 1823308

// By default assume that the signatures in ancestors of this block are valid.
consensus.defaultAssumeValid = uint256S("0x7d49542fc498f0bfcb5201df6e244377d3e8d9f1bb7c0646ec8f7d9a2c4705e0"); // 1761588
consensus.defaultAssumeValid = uint256S("0xaa99e5339b327bc5ba0fd7b1f4e37f440feb0f675489cace27990831b8944d34"); // 1823308

/**
* The message start string is designed to be unlikely to occur in normal data.
Expand Down
31 changes: 18 additions & 13 deletions src/pocketdb/helpers/ShortFormHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,26 @@
#include <set>


static const std::map<PocketDb::ShortTxType, std::string> typesMap = {
{ PocketDb::ShortTxType::PocketnetTeam, "pocketnetteam" },
{ PocketDb::ShortTxType::Money, "money" },
{ PocketDb::ShortTxType::Referal, "referal" },
{ PocketDb::ShortTxType::Answer, "answer" },
{ PocketDb::ShortTxType::Comment, "comment" },
{ PocketDb::ShortTxType::Subscriber, "subscriber" },
{ PocketDb::ShortTxType::CommentScore, "commentscore" },
{ PocketDb::ShortTxType::ContentScore, "contentscore" },
{ PocketDb::ShortTxType::PrivateContent, "privatecontent" },
{ PocketDb::ShortTxType::Boost, "boost" },
{ PocketDb::ShortTxType::Repost, "repost" },
};
static const std::map<PocketDb::ShortTxType, std::string>& GetTypesMap() {
static const std::map<PocketDb::ShortTxType, std::string> typesMap = {
{ PocketDb::ShortTxType::PocketnetTeam, "pocketnetteam" },
{ PocketDb::ShortTxType::Money, "money" },
{ PocketDb::ShortTxType::Referal, "referal" },
{ PocketDb::ShortTxType::Answer, "answer" },
{ PocketDb::ShortTxType::Comment, "comment" },
{ PocketDb::ShortTxType::Subscriber, "subscriber" },
{ PocketDb::ShortTxType::CommentScore, "commentscore" },
{ PocketDb::ShortTxType::ContentScore, "contentscore" },
{ PocketDb::ShortTxType::PrivateContent, "privatecontent" },
{ PocketDb::ShortTxType::Boost, "boost" },
{ PocketDb::ShortTxType::Repost, "repost" },
};
return typesMap;
}

std::string PocketHelpers::ShortTxTypeConvertor::toString(PocketDb::ShortTxType type)
{
static const auto& typesMap = GetTypesMap();
auto str = typesMap.find(type);
if (str != typesMap.end()) {
return str->second;
Expand All @@ -47,6 +51,7 @@ bool PocketHelpers::ShortTxFilterValidator::Notifications::IsFilterAllowed(Pocke

PocketDb::ShortTxType PocketHelpers::ShortTxTypeConvertor::strToType(const std::string& typeStr)
{
static const auto& typesMap = GetTypesMap();
auto type = std::find_if(typesMap.begin(), typesMap.end(), [&](const auto& elem) { return elem.second == typeStr; });
if (type != typesMap.end()) {
return type->first;
Expand Down

0 comments on commit ffc9247

Please sign in to comment.