test eras again
This commit is contained in:
@@ -260,20 +260,9 @@ int32_t komodo_notaries(uint8_t pubkeys[64][33],int32_t height,uint32_t timestam
|
||||
int staked_era; int32_t numSN;
|
||||
uint8_t staked_pubkeys[64][33];
|
||||
staked_era = STAKED_era(timestamp);
|
||||
|
||||
if (staked_era != 0)
|
||||
{
|
||||
numSN = numStakedNotaries(staked_pubkeys,staked_era);
|
||||
memcpy(pubkeys,staked_pubkeys,numSN * 33);
|
||||
return(numSN);
|
||||
}
|
||||
else
|
||||
{
|
||||
// this means we are in a gap, so we set the array of pubkeys to zero, this does't seem to correctly work, so added exeption to komodo.h aswell.
|
||||
printf("%s is a STAKED chain and is in an ERA GAP.\n",ASSETCHAINS_SYMBOL);
|
||||
memset(pubkeys,0,64 * 33);
|
||||
return(64);
|
||||
}
|
||||
numSN = numStakedNotaries(staked_pubkeys,staked_era);
|
||||
memcpy(pubkeys,staked_pubkeys,numSN * 33);
|
||||
return(numSN);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -290,11 +290,14 @@ int8_t numStakedNotaries(uint8_t pubkeys[64][33],int8_t era) {
|
||||
}
|
||||
else
|
||||
{
|
||||
// era is zero so we need to null out the notary address's
|
||||
// era is zero so we need to null out the notary address's and pubkeys.
|
||||
pthread_mutex_lock(&staked_mutex);
|
||||
memset(NOTARYADDRS,0,sizeof(NOTARYADDRS));
|
||||
NUM_NOTARIES = 0;
|
||||
memset(pubkeys,0,64 * 33);
|
||||
pthread_mutex_unlock(&staked_mutex);
|
||||
printf("%s is a STAKED chain and is in an ERA GAP.\n",ASSETCHAINS_SYMBOL);
|
||||
return(64);
|
||||
}
|
||||
return(retval);
|
||||
}
|
||||
|
||||
@@ -7,9 +7,9 @@
|
||||
|
||||
static const int STAKED_ERA_GAP = 777;
|
||||
|
||||
static const int STAKED_NOTARIES_TIMESTAMP1 = 1541410234;
|
||||
static const int STAKED_NOTARIES_TIMESTAMP2 = 1541411534;
|
||||
static const int STAKED_NOTARIES_TIMESTAMP3 = 1541412000;
|
||||
static const int STAKED_NOTARIES_TIMESTAMP1 = 1541412157;
|
||||
static const int STAKED_NOTARIES_TIMESTAMP2 = 1541413657;
|
||||
static const int STAKED_NOTARIES_TIMESTAMP3 = 1604233333;
|
||||
static const int STAKED_NOTARIES_TIMESTAMP4 = 1604244444;
|
||||
|
||||
extern const char *notaries_STAKED1[][2];
|
||||
|
||||
Reference in New Issue
Block a user