try print
This commit is contained in:
@@ -832,6 +832,7 @@ void komodo_connectblock(CBlockIndex *pindex,CBlock& block)
|
|||||||
for (i=0; i<txn_count; i++)
|
for (i=0; i<txn_count; i++)
|
||||||
{
|
{
|
||||||
if ((is_STAKED(ASSETCHAINS_SYMBOL) != 0) && (STAKED_era(pindex->GetBlockTime()) == 0)) {
|
if ((is_STAKED(ASSETCHAINS_SYMBOL) != 0) && (STAKED_era(pindex->GetBlockTime()) == 0)) {
|
||||||
|
printf("ERA 0 SKIP %s getblocktime: %d pindex->nTime : %d\n",pindex->GetBlockTime(),pindex->nTime,ASSETCHAINS_SYMBOL);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
txhash = block.vtx[i].GetHash();
|
txhash = block.vtx[i].GetHash();
|
||||||
|
|||||||
@@ -254,7 +254,7 @@ int32_t komodo_notaries(uint8_t pubkeys[64][33],int32_t height,uint32_t timestam
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ // here we can activate our pubkeys for STAKED chains by era.
|
{ // here we can activate our pubkeys for STAKED chains everythig is in notaries_staked.cpp
|
||||||
if (timestamp != 0)
|
if (timestamp != 0)
|
||||||
{
|
{
|
||||||
int staked_era; int32_t numSN;
|
int staked_era; int32_t numSN;
|
||||||
|
|||||||
@@ -118,22 +118,6 @@ int is_STAKED(const char *chain_name) {
|
|||||||
return(STAKED);
|
return(STAKED);
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef SERVER
|
|
||||||
int8_t updateStakedNotary() {
|
|
||||||
std::string notaryname;
|
|
||||||
char Raddress[18]; uint8_t pubkey33[33];
|
|
||||||
decode_hex(pubkey33,33,(char *)NOTARY_PUBKEY.c_str());
|
|
||||||
pubkey2addr((char *)Raddress,(uint8_t *)pubkey33);
|
|
||||||
NOTARY_ADDRESS.clear();
|
|
||||||
NOTARY_ADDRESS.assign(Raddress);
|
|
||||||
return(StakedNotaryID(notaryname,Raddress));
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
int8_t updateStakedNotary() {
|
|
||||||
return(-1);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int STAKED_era(int timestamp)
|
int STAKED_era(int timestamp)
|
||||||
{
|
{
|
||||||
int8_t era = 0;
|
int8_t era = 0;
|
||||||
@@ -170,6 +154,23 @@ int STAKED_era(int timestamp)
|
|||||||
return(era);
|
return(era);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef SERVER
|
||||||
|
int8_t updateStakedNotary() {
|
||||||
|
if ( NOTARY_ADDRESS.empty() ) {
|
||||||
|
std::string notaryname;
|
||||||
|
char Raddress[18]; uint8_t pubkey33[33];
|
||||||
|
decode_hex(pubkey33,33,(char *)NOTARY_PUBKEY.c_str());
|
||||||
|
pubkey2addr((char *)Raddress,(uint8_t *)pubkey33);
|
||||||
|
NOTARY_ADDRESS.assign(Raddress);
|
||||||
|
}
|
||||||
|
return(StakedNotaryID(notaryname,Raddress));
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
int8_t updateStakedNotary() {
|
||||||
|
return(-1);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
int8_t StakedNotaryID(std::string ¬aryname, char *Raddress) {
|
int8_t StakedNotaryID(std::string ¬aryname, char *Raddress) {
|
||||||
int8_t notaryID = -1;
|
int8_t notaryID = -1;
|
||||||
if ( STAKED_ERA != 0 ) {
|
if ( STAKED_ERA != 0 ) {
|
||||||
|
|||||||
Reference in New Issue
Block a user