diff --git a/src/CheckpointsData.h b/src/CheckpointsData.h index 01e61bc8..93755e40 100644 --- a/src/CheckpointsData.h +++ b/src/CheckpointsData.h @@ -74,7 +74,8 @@ const std::initializer_list CHECKPOINTS = { {298741, "cfb2f445ff52887d87340cf8797dd9ed53ab4b3b8eb168ef95a6e1553f1b1749"}, {315469, "9b7932e00a15b4cfbf691a5d51ce394245c59f1b7892573123f2b0e590796445"}, {322609, "0c94b77d4ba377ea42108a24345338a7dbe2217a6aa6774c6d0b6da9f2c14882"}, - {324706, "8b9099e50ddb3c111c4919223f071db4c888ee9a22b8893951ebb4295f864498"} + {324706, "8b9099e50ddb3c111c4919223f071db4c888ee9a22b8893951ebb4295f864498"}, + {329541, "f493e1ca40fe4e3a45143e02b5e061761149f02f2dfaeccfe06416c6d4c1e3da"} }; } diff --git a/src/DynexCNCore/Auth.cpp b/src/DynexCNCore/Auth.cpp index c1eeb1df..df4af036 100644 --- a/src/DynexCNCore/Auth.cpp +++ b/src/DynexCNCore/Auth.cpp @@ -53,7 +53,7 @@ using namespace Logging; namespace DynexCN { // mallob block authentication endpoints - static const std::vector mallob_endpoints{ "https://node.dynexcoin.org", "https://node2.dynexcoin.org", "https://network.dynexcoin.org" }; + static const std::vector mallob_endpoints{ "https://networkv2.dynexcoin.org", "https://node.dynexcoin.org", "https://node2.dynexcoin.org", "https://network.dynexcoin.org" }; static const int mallob_timeout = 20; // curl return value function diff --git a/src/P2p/NetNode.cpp b/src/P2p/NetNode.cpp index baeb910b..11fdc2a4 100644 --- a/src/P2p/NetNode.cpp +++ b/src/P2p/NetNode.cpp @@ -287,6 +287,20 @@ namespace DynexCN int ret = 0; handled = true; + // enforce new version?: + if (m_network_id!=m_network_id_np && newversiondate()) { + m_network_id = m_network_id_np; + logger(INFO, BRIGHT_GREEN) << "Switched network to non-privacy " << m_network_id; + // drop this connection: + ctx.m_state = DynexCNConnectionContext::state_shutdown; + // drop all other connections: + forEachConnection([&](P2pConnectionContext& context) { + context.m_state = DynexCNConnectionContext::state_shutdown; + logger(INFO) << "Node connection to " << Common::ipAddressToString(context.m_remote_ip) << " dropped"; + }); + return 0; + } + if (cmd.isResponse && cmd.command == COMMAND_TIMED_SYNC::ID) { if (!handleTimedSyncResponse(cmd.buf, ctx)) { // invalid response, close connection diff --git a/src/version.h.in b/src/version.h.in index 94eb2628..b34da683 100644 --- a/src/version.h.in +++ b/src/version.h.in @@ -12,7 +12,7 @@ #define CN_VER_MAJOR 2 #define CN_VER_MINOR 2 #define CN_VER_REV 2 -#define CN_VER_BUILD 20231121 +#define CN_VER_BUILD 20231211 #define CN_VER_REMARK "#non-privacy" #define CN_PROJECT_VERSION STR(CN_VER_MAJOR) "." STR(CN_VER_MINOR) "." STR(CN_VER_REV) #define CN_PROJECT_VERSION_BUILD_NO STR(CN_VER_BUILD)