From c99a0f4520dbe826013c890630981870dd4e9929 Mon Sep 17 00:00:00 2001 From: Andy Oknen Date: Tue, 9 Aug 2022 14:59:14 +0300 Subject: [PATCH 1/4] Update release.yml --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 From f6b79282a827e061a06d63cef56ae5e12ce13f2d Mon Sep 17 00:00:00 2001 From: Andy Oknen Date: Tue, 9 Aug 2022 15:03:21 +0300 Subject: [PATCH 2/4] Change version to 0.20.26 --- CMakeLists.txt | 2 +- build_msvc/pocketcoin_config.h | 6 +++--- configure.ac | 2 +- src/chainparams.cpp | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 74ea666be..068c0358d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.15) set(_CLIENT_VERSION_MAJOR 0) set(_CLIENT_VERSION_MINOR 20) -set(_CLIENT_VERSION_REVISION 25) +set(_CLIENT_VERSION_REVISION 26) set(_CLIENT_VERSION_BUILD 0) set(_CLIENT_VERSION_IS_RELEASE false) set(_COPYRIGHT_YEAR 2022) diff --git a/build_msvc/pocketcoin_config.h b/build_msvc/pocketcoin_config.h index f1d52c14e..01e8a3c6d 100644 --- a/build_msvc/pocketcoin_config.h +++ b/build_msvc/pocketcoin_config.h @@ -14,7 +14,7 @@ #define CLIENT_VERSION_MINOR 20 /* Build revision */ -#define CLIENT_VERSION_REVISION 25 +#define CLIENT_VERSION_REVISION 26 /* Version Build */ #define CLIENT_VERSION_BUILD 0 @@ -346,7 +346,7 @@ #define PACKAGE_NAME "Pocketnet Core" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "Pocketnet Core 0.20.25" +#define PACKAGE_STRING "Pocketnet Core 0.20.26" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "pocketcoin" @@ -355,7 +355,7 @@ #define PACKAGE_URL "https://github.com/pocketnetteam" /* Define to the version of this package. */ -#define PACKAGE_VERSION "0.20.25" +#define PACKAGE_VERSION "0.20.26" /* Define to necessary symbol if this constant uses a non-standard name on your system. */ diff --git a/configure.ac b/configure.ac index cd33e0db2..3baa04546 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N) AC_PREREQ([2.60]) define(_CLIENT_VERSION_MAJOR, 0) define(_CLIENT_VERSION_MINOR, 20) -define(_CLIENT_VERSION_REVISION, 25) +define(_CLIENT_VERSION_REVISION, 26) define(_CLIENT_VERSION_BUILD, 0) define(_CLIENT_VERSION_IS_RELEASE, true) define(_COPYRIGHT_YEAR, 2022) diff --git a/src/chainparams.cpp b/src/chainparams.cpp index eee8bd7b2..0be4bf7eb 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -116,10 +116,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. From fdbfe3753b8451c943cfa4a6bc9a33bf93dc0146 Mon Sep 17 00:00:00 2001 From: lostystyg Date: Thu, 11 Aug 2022 15:55:31 +0400 Subject: [PATCH 3/4] Fixed static initialization order problem --- src/pocketdb/helpers/ShortFormHelper.cpp | 31 ++++++++++++++---------- 1 file changed, 18 insertions(+), 13 deletions(-) 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; From 6ddc9ab850fdb05a7210bb8332b4b5caf9d29e0e Mon Sep 17 00:00:00 2001 From: only1question Date: Thu, 11 Aug 2022 15:07:18 +0300 Subject: [PATCH 4/4] Fixed RollbackBlockingList --- src/pocketdb/repositories/ChainRepository.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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))