Skip to content
Permalink
Browse files

insert activation height of 2.1m blocks for activetime changes

  • Loading branch information...
enkayz committed Jun 3, 2019
1 parent a1a5483 commit d2892124d997c1e15f87a2bdf2dfeff63f1f31fe
Showing with 7 additions and 3 deletions.
  1. +2 −2 src/fortunastake.cpp
  2. +5 −1 src/fortunastake.h
@@ -139,10 +139,10 @@ void ProcessMessageFortunastake(CNode* pfrom, std::string& strCommand, CDataStre
// mn.pubkey = pubkey, IsVinAssociatedWithPubkey is validated once below,
// after that they just need to match
if(count == -1 && mn.pubkey == pubkey && !mn.UpdatedWithin(FORTUNASTAKE_MIN_DSEE_SECONDS)){
mn.UpdateLastSeen(sigTime); // update last seen with the sigTime since it's a new entry
if (pindexBest->nHeight > FORTUNASTAKE_ACTIVETIME_FIXHEIGHT) mn.UpdateLastSeen(sigTime); // update last seen with the sigTime since it's a new entry
if(mn.now < sigTime){ //take the newest entry
if (fDebugFS & fDebugNet) printf("dsee - Got updated entry for %s\n", addr.ToString().c_str());
mn.UpdateLastSeen(); // update with current time (i.e. the time we received this 'new' dsee
if (pindexBest->nHeight > FORTUNASTAKE_ACTIVETIME_FIXHEIGHT)mn.UpdateLastSeen(); // update with current time (i.e. the time we received this 'new' dsee
mn.pubkey2 = pubkey2;
mn.now = sigTime;
mn.sig = vchSig;
@@ -42,6 +42,8 @@ class uint256;
#define FORTUNASTAKE_FAIR_PAYMENT_MINIMUM 200
#define FORTUNASTAKE_FAIR_PAYMENT_ROUNDS 3

#define FORTUNASTAKE_ACTIVETIME_FIXHEIGHT 2100000

using namespace std;

class CFortunastakePaymentWinner;
@@ -201,7 +203,9 @@ class CFortunaStake

void UpdateLastSeen(int64_t override=0)
{
if(override == 0 || override > GetAdjustedTime()){
if (pindexBest->nHeight > FORTUNASTAKE_ACTIVETIME_FIXHEIGHT && (override == 0 || override > GetAdjustedTime())) {
lastTimeSeen = GetAdjustedTime();
} else if(override == 0){
lastTimeSeen = GetAdjustedTime();
} else {
lastTimeSeen = override;

0 comments on commit d289212

Please sign in to comment.
You can’t perform that action at this time.