Skip to content

Commit

Permalink
version 20231211
Browse files Browse the repository at this point in the history
+ Amazon AWS cloud based block auth
+ Improved version switch handling
+ Updated checkpoints
  • Loading branch information
dynexcoin committed Dec 11, 2023
1 parent 2e555b2 commit 98b942b
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/CheckpointsData.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ const std::initializer_list<CheckpointData> CHECKPOINTS = {
{298741, "cfb2f445ff52887d87340cf8797dd9ed53ab4b3b8eb168ef95a6e1553f1b1749"},
{315469, "9b7932e00a15b4cfbf691a5d51ce394245c59f1b7892573123f2b0e590796445"},
{322609, "0c94b77d4ba377ea42108a24345338a7dbe2217a6aa6774c6d0b6da9f2c14882"},
{324706, "8b9099e50ddb3c111c4919223f071db4c888ee9a22b8893951ebb4295f864498"}
{324706, "8b9099e50ddb3c111c4919223f071db4c888ee9a22b8893951ebb4295f864498"},
{329541, "f493e1ca40fe4e3a45143e02b5e061761149f02f2dfaeccfe06416c6d4c1e3da"}
};

}
2 changes: 1 addition & 1 deletion src/DynexCNCore/Auth.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ using namespace Logging;
namespace DynexCN {

// mallob block authentication endpoints
static const std::vector<std::string> mallob_endpoints{ "https://node.dynexcoin.org", "https://node2.dynexcoin.org", "https://network.dynexcoin.org" };
static const std::vector<std::string> 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
Expand Down
14 changes: 14 additions & 0 deletions src/P2p/NetNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/version.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 98b942b

Please sign in to comment.