diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 88c85e3af..b86990d73 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,7 +2,7 @@ name: Build & Deploy Release Draft on: push: - tags: v*.*.* + tags: '*.*.*' permissions: contents: read @@ -157,4 +157,4 @@ jobs: # with: # name: bastyon.tgz # - name: Unpack artifact - # run: tar xzf bastyon.tgz -C /data/gui/ --no-same-owner \ No newline at end of file + # run: tar xzf bastyon.tgz -C /data/gui/ --no-same-owner diff --git a/src/chainparams.cpp b/src/chainparams.cpp index 7415be968..89f3c5a70 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -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. diff --git a/src/pocketdb/helpers/ShortFormHelper.cpp b/src/pocketdb/helpers/ShortFormHelper.cpp index f6dbeba75..ad8af9678 100644 --- a/src/pocketdb/helpers/ShortFormHelper.cpp +++ b/src/pocketdb/helpers/ShortFormHelper.cpp @@ -9,22 +9,26 @@ #include -static const std::map 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& GetTypesMap() { + static const std::map 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; @@ -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; diff --git a/src/pocketdb/repositories/ChainRepository.cpp b/src/pocketdb/repositories/ChainRepository.cpp index 4b8055da5..d48ae9d40 100644 --- a/src/pocketdb/repositories/ChainRepository.cpp +++ b/src/pocketdb/repositories/ChainRepository.cpp @@ -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); @@ -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))