test new era logic

This commit is contained in:
blackjok3r
2018-11-06 16:43:41 +08:00
parent fc055b3b49
commit 120b7c3b02
2 changed files with 8 additions and 11 deletions

View File

@@ -818,9 +818,7 @@ void komodo_connectblock(CBlockIndex *pindex,CBlock& block)
int8_t numSN = numStakedNotaries(tmp_pubkeys,staked_era);
UpdateNotaryAddrs(tmp_pubkeys,numSN);
STAKED_ERA = staked_era;
if ( NOTARYADDRS[0][0] != 0 )
{
if ( NOTARY_PUBKEY33[0] != 0 )
if ( NOTARYADDRS[0][0] != 0 && NOTARY_PUBKEY33[0] != 0 )
{
if ( (IS_STAKED_NOTARY= updateStakedNotary()) > -1 )
{
@@ -829,7 +827,6 @@ void komodo_connectblock(CBlockIndex *pindex,CBlock& block)
}
}
}
}
lastStakedEra = staked_era;
}
numnotaries = komodo_notaries(pubkeys,pindex->nHeight,pindex->GetBlockTime());

View File

@@ -5,11 +5,11 @@
#include "crosschain.h"
#include "cc/CCinclude.h"
static const int STAKED_ERA_GAP = 777;
static const int STAKED_ERA_GAP = 300;
static const int STAKED_NOTARIES_TIMESTAMP1 = 1541422105;
static const int STAKED_NOTARIES_TIMESTAMP2 = 1541423282;
static const int STAKED_NOTARIES_TIMESTAMP3 = 1541424459;
static const int STAKED_NOTARIES_TIMESTAMP1 = 1541494052;
static const int STAKED_NOTARIES_TIMESTAMP2 = 1541494052;
static const int STAKED_NOTARIES_TIMESTAMP3 = 1541494052;
static const int STAKED_NOTARIES_TIMESTAMP4 = 1604244444;
extern const char *notaries_STAKED1[][2];