Skip to content

Commit

Permalink
fixup! Refactor softwareexpiry to use global variable
Browse files Browse the repository at this point in the history
  • Loading branch information
luke-jr committed Mar 10, 2024
1 parent bc7bbdb commit 40d654a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/clientversion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ std::string LicenseInfo()
"\n";
}

int64_t g_software_expiry{DEFAULT_SOFTWARE_EXPIRY};

bool IsThisSoftwareExpired(int64_t nTime)
{
if (g_software_expiry <= 0) {
Expand Down
2 changes: 1 addition & 1 deletion src/clientversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ std::string LicenseInfo();
static const int64_t SECONDS_PER_YEAR = 31558060;
static const int POSIX_EPOCH_YEAR = 1970;
static const int64_t DEFAULT_SOFTWARE_EXPIRY = ((COPYRIGHT_YEAR - POSIX_EPOCH_YEAR) * SECONDS_PER_YEAR) + (SECONDS_PER_YEAR * 2);
int64_t g_software_expiry{DEFAULT_SOFTWARE_EXPIRY};
extern int64_t g_software_expiry;

bool IsThisSoftwareExpired(int64_t nTime);

Expand Down

0 comments on commit 40d654a

Please sign in to comment.