Skip to content

Commit

Permalink
Merge pull request #357 from lostystyg/0.21
Browse files Browse the repository at this point in the history
0.21 Actualization
  • Loading branch information
lostystyg authored Aug 11, 2022
2 parents cc77fdc + 11a03b6 commit 8a1b0af
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 19 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
4 changes: 2 additions & 2 deletions src/pocketdb/repositories/ChainRepository.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,7 @@ namespace PocketDb
and ut.Height > 0
join BlockingLists bl on bl.IdSource = us.Id and bl.IdTarget = ut.Id
where b.Type in (305)
and b.Height > ?
and b.Height >= ?
)
)sql");
TryBindStatementInt(delListStmt, 1, height);
Expand All @@ -701,7 +701,7 @@ namespace PocketDb
and ut.Height > 0
where b.Type in (305)
-- and b.Last = 1
and b.Height > ?
and b.Height >= ?
and not exists (select 1 from Transactions bc indexed by Transactions_Type_Last_String1_String2_Height
where bc.Type in (306) and bc.Last = 1 and bc.String1 = b.String1
and bc.String2 in (select b.String2 union select value from json_each(b.String3))
Expand Down

0 comments on commit 8a1b0af

Please sign in to comment.