try print

This commit is contained in:
blackjok3r
2018-11-05 19:48:36 +08:00
parent 76eb9a496e
commit 96c7f474b9
3 changed files with 19 additions and 17 deletions

View File

@@ -832,6 +832,7 @@ void komodo_connectblock(CBlockIndex *pindex,CBlock& block)
for (i=0; i<txn_count; i++)
{
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;
}
txhash = block.vtx[i].GetHash();

View File

@@ -254,7 +254,7 @@ int32_t komodo_notaries(uint8_t pubkeys[64][33],int32_t height,uint32_t timestam
}
}
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)
{
int staked_era; int32_t numSN;

View File

@@ -118,22 +118,6 @@ int is_STAKED(const char *chain_name) {
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)
{
int8_t era = 0;
@@ -170,6 +154,23 @@ int STAKED_era(int timestamp)
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 &notaryname, char *Raddress) {
int8_t notaryID = -1;
if ( STAKED_ERA != 0 ) {