remove all prints that are not momom that we normally see
This commit is contained in:
18
src/komodo.h
18
src/komodo.h
@@ -832,7 +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\n",ASSETCHAINS_SYMBOL);
|
//printf("ERA 0 SKIP %s\n",ASSETCHAINS_SYMBOL);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
txhash = block.vtx[i].GetHash();
|
txhash = block.vtx[i].GetHash();
|
||||||
@@ -856,7 +856,7 @@ void komodo_connectblock(CBlockIndex *pindex,CBlock& block)
|
|||||||
printf("%02x",scriptPubKey[k]);
|
printf("%02x",scriptPubKey[k]);
|
||||||
printf(" scriptPubKey doesnt match any notary vini.%d of %d\n",j,numvins);
|
printf(" scriptPubKey doesnt match any notary vini.%d of %d\n",j,numvins);
|
||||||
}
|
}
|
||||||
} else printf("cant get scriptPubKey for ht.%d txi.%d vin.%d\n",height,i,j);
|
} //else printf("cant get scriptPubKey for ht.%d txi.%d vin.%d\n",height,i,j);
|
||||||
}
|
}
|
||||||
numvalid = bitweight(signedmask);
|
numvalid = bitweight(signedmask);
|
||||||
if ( ((height < 90000 || (signedmask & 1) != 0) && numvalid >= KOMODO_MINRATIFY) ||
|
if ( ((height < 90000 || (signedmask & 1) != 0) && numvalid >= KOMODO_MINRATIFY) ||
|
||||||
@@ -880,7 +880,7 @@ void komodo_connectblock(CBlockIndex *pindex,CBlock& block)
|
|||||||
fwrite(&signedmask,1,sizeof(signedmask),signedfp);
|
fwrite(&signedmask,1,sizeof(signedmask),signedfp);
|
||||||
fflush(signedfp);
|
fflush(signedfp);
|
||||||
}
|
}
|
||||||
printf("[%s] ht.%d txi.%d signedmask.%llx numvins.%d numvouts.%d <<<<<<<<<<< notarized\n",ASSETCHAINS_SYMBOL,height,i,(long long)signedmask,numvins,numvouts);
|
//printf("[%s] ht.%d txi.%d signedmask.%llx numvins.%d numvouts.%d <<<<<<<<<<< notarized\n",ASSETCHAINS_SYMBOL,height,i,(long long)signedmask,numvins,numvouts);
|
||||||
}
|
}
|
||||||
notarized = 1;
|
notarized = 1;
|
||||||
}
|
}
|
||||||
@@ -917,20 +917,20 @@ void komodo_connectblock(CBlockIndex *pindex,CBlock& block)
|
|||||||
{
|
{
|
||||||
for (k=0; k<len; k++)
|
for (k=0; k<len; k++)
|
||||||
printf("%02x",scriptbuf[k]);
|
printf("%02x",scriptbuf[k]);
|
||||||
printf(" <- notaryid.%d ht.%d i.%d j.%d numvouts.%d numvins.%d voutmask.%llx txid.(%s)\n",notaryid,height,i,j,numvouts,numvins,(long long)voutmask,txhash.ToString().c_str());
|
//printf(" <- notaryid.%d ht.%d i.%d j.%d numvouts.%d numvins.%d voutmask.%llx txid.(%s)\n",notaryid,height,i,j,numvouts,numvins,(long long)voutmask,txhash.ToString().c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( IS_KOMODO_NOTARY != 0 && ASSETCHAINS_SYMBOL[0] == 0 )
|
if ( IS_KOMODO_NOTARY != 0 && ASSETCHAINS_SYMBOL[0] == 0 )
|
||||||
printf(") ");
|
printf(") ");
|
||||||
if ( 0 && ASSETCHAINS_SYMBOL[0] == 0 )
|
if ( 0 && ASSETCHAINS_SYMBOL[0] == 0 )
|
||||||
printf("[%s] ht.%d txi.%d signedmask.%llx numvins.%d numvouts.%d notarized.%d special.%d isratification.%d\n",ASSETCHAINS_SYMBOL,height,i,(long long)signedmask,numvins,numvouts,notarized,specialtx,isratification);
|
//printf("[%s] ht.%d txi.%d signedmask.%llx numvins.%d numvouts.%d notarized.%d special.%d isratification.%d\n",ASSETCHAINS_SYMBOL,height,i,(long long)signedmask,numvins,numvouts,notarized,specialtx,isratification);
|
||||||
if ( notarized != 0 && (notarizedheight != 0 || specialtx != 0) )
|
if ( notarized != 0 && (notarizedheight != 0 || specialtx != 0) )
|
||||||
{
|
{
|
||||||
if ( isratification != 0 )
|
if ( isratification != 0 )
|
||||||
{
|
{
|
||||||
printf("%s NOTARY SIGNED.%llx numvins.%d ht.%d txi.%d notaryht.%d specialtx.%d\n",ASSETCHAINS_SYMBOL,(long long)signedmask,numvins,height,i,notarizedheight,specialtx);
|
//printf("%s NOTARY SIGNED.%llx numvins.%d ht.%d txi.%d notaryht.%d specialtx.%d\n",ASSETCHAINS_SYMBOL,(long long)signedmask,numvins,height,i,notarizedheight,specialtx);
|
||||||
printf("ht.%d specialtx.%d isratification.%d numvouts.%d signed.%llx numnotaries.%d\n",height,specialtx,isratification,numvouts,(long long)signedmask,numnotaries);
|
//printf("ht.%d specialtx.%d isratification.%d numvouts.%d signed.%llx numnotaries.%d\n",height,specialtx,isratification,numvouts,(long long)signedmask,numnotaries);
|
||||||
}
|
}
|
||||||
if ( specialtx != 0 && isratification != 0 && numvouts > 2 )
|
if ( specialtx != 0 && isratification != 0 && numvouts > 2 )
|
||||||
{
|
{
|
||||||
@@ -959,8 +959,8 @@ void komodo_connectblock(CBlockIndex *pindex,CBlock& block)
|
|||||||
{
|
{
|
||||||
memset(&txhash,0,sizeof(txhash));
|
memset(&txhash,0,sizeof(txhash));
|
||||||
komodo_stateupdate(height,pubkeys,numvalid,0,txhash,0,0,0,0,0,0,0,0,0,0,zero,0);
|
komodo_stateupdate(height,pubkeys,numvalid,0,txhash,0,0,0,0,0,0,0,0,0,0,zero,0);
|
||||||
printf("RATIFIED! >>>>>>>>>> new notaries.%d newheight.%d from height.%d\n",numvalid,(((height+KOMODO_ELECTION_GAP/2)/KOMODO_ELECTION_GAP)+1)*KOMODO_ELECTION_GAP,height);
|
//printf("RATIFIED! >>>>>>>>>> new notaries.%d newheight.%d from height.%d\n",numvalid,(((height+KOMODO_ELECTION_GAP/2)/KOMODO_ELECTION_GAP)+1)*KOMODO_ELECTION_GAP,height);
|
||||||
} else printf("signedmask.%llx numvalid.%d wt.%d numnotaries.%d\n",(long long)signedmask,numvalid,bitweight(signedmask),numnotaries);
|
} //else printf("signedmask.%llx numvalid.%d wt.%d numnotaries.%d\n",(long long)signedmask,numvalid,bitweight(signedmask),numnotaries);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1303,24 +1303,24 @@ arith_uint256 komodo_PoWtarget(int32_t *percPoSp,arith_uint256 target,int32_t he
|
|||||||
{
|
{
|
||||||
n++;
|
n++;
|
||||||
percPoS++;
|
percPoS++;
|
||||||
if ( ASSETCHAINS_STAKED < 100 )
|
//if ( ASSETCHAINS_STAKED < 100 )
|
||||||
fprintf(stderr,"0");
|
// fprintf(stderr,"0");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ( ASSETCHAINS_STAKED < 100 )
|
//if ( ASSETCHAINS_STAKED < 100 )
|
||||||
fprintf(stderr,"1");
|
// fprintf(stderr,"1");
|
||||||
sum += UintToArith256(pindex->GetBlockHash());
|
sum += UintToArith256(pindex->GetBlockHash());
|
||||||
m++;
|
m++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( ASSETCHAINS_STAKED < 100 && (i % 10) == 9 )
|
//if ( ASSETCHAINS_STAKED < 100 && (i % 10) == 9 )
|
||||||
fprintf(stderr," %d, ",percPoS);
|
// fprintf(stderr," %d, ",percPoS);
|
||||||
}
|
}
|
||||||
if ( m+n < 100 )
|
if ( m+n < 100 )
|
||||||
percPoS = ((percPoS * n) + (goalperc * (100-n))) / 100;
|
percPoS = ((percPoS * n) + (goalperc * (100-n))) / 100;
|
||||||
if ( ASSETCHAINS_STAKED < 100 )
|
if ( ASSETCHAINS_STAKED < 100 )
|
||||||
fprintf(stderr," -> %d%% percPoS vs goalperc.%d ht.%d\n",percPoS,goalperc,height);
|
//fprintf(stderr," -> %d%% percPoS vs goalperc.%d ht.%d\n",percPoS,goalperc,height);
|
||||||
*percPoSp = percPoS;
|
*percPoSp = percPoS;
|
||||||
if ( m > 0 )
|
if ( m > 0 )
|
||||||
{
|
{
|
||||||
@@ -1337,7 +1337,7 @@ arith_uint256 komodo_PoWtarget(int32_t *percPoSp,arith_uint256 target,int32_t he
|
|||||||
if ( oldflag != 0 )
|
if ( oldflag != 0 )
|
||||||
bnTarget = (ave / arith_uint256(goalperc * goalperc * goalperc)) * arith_uint256(percPoS * percPoS);
|
bnTarget = (ave / arith_uint256(goalperc * goalperc * goalperc)) * arith_uint256(percPoS * percPoS);
|
||||||
else bnTarget = (ave / arith_uint256(goalperc * goalperc * goalperc * goalperc)) * arith_uint256(percPoS * percPoS);
|
else bnTarget = (ave / arith_uint256(goalperc * goalperc * goalperc * goalperc)) * arith_uint256(percPoS * percPoS);
|
||||||
if ( ASSETCHAINS_STAKED < 100 )
|
/*if ( ASSETCHAINS_STAKED < 100 )
|
||||||
{
|
{
|
||||||
for (i=31; i>=24; i--)
|
for (i=31; i>=24; i--)
|
||||||
fprintf(stderr,"%02x",((uint8_t *)&ave)[i]);
|
fprintf(stderr,"%02x",((uint8_t *)&ave)[i]);
|
||||||
@@ -1348,7 +1348,7 @@ arith_uint256 komodo_PoWtarget(int32_t *percPoSp,arith_uint256 target,int32_t he
|
|||||||
for (i=31; i>=24; i--)
|
for (i=31; i>=24; i--)
|
||||||
fprintf(stderr,"%02x",((uint8_t *)&target)[i]);
|
fprintf(stderr,"%02x",((uint8_t *)&target)[i]);
|
||||||
fprintf(stderr," ht.%d percPoS.%d vs goal.%d -> diff %d\n",height,percPoS,goalperc,goalperc - percPoS);
|
fprintf(stderr," ht.%d percPoS.%d vs goal.%d -> diff %d\n",height,percPoS,goalperc,goalperc - percPoS);
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
else if ( percPoS > goalperc ) // decrease PoW diff -> raise bnTarget
|
else if ( percPoS > goalperc ) // decrease PoW diff -> raise bnTarget
|
||||||
{
|
{
|
||||||
@@ -1367,7 +1367,7 @@ arith_uint256 komodo_PoWtarget(int32_t *percPoSp,arith_uint256 target,int32_t he
|
|||||||
if ( bnTarget < ave )
|
if ( bnTarget < ave )
|
||||||
bnTarget = ave;
|
bnTarget = ave;
|
||||||
}
|
}
|
||||||
if ( 1 )
|
/*if ( 1 )
|
||||||
{
|
{
|
||||||
for (i=31; i>=24; i--)
|
for (i=31; i>=24; i--)
|
||||||
fprintf(stderr,"%02x",((uint8_t *)&ave)[i]);
|
fprintf(stderr,"%02x",((uint8_t *)&ave)[i]);
|
||||||
@@ -1378,7 +1378,7 @@ arith_uint256 komodo_PoWtarget(int32_t *percPoSp,arith_uint256 target,int32_t he
|
|||||||
for (i=31; i>=24; i--)
|
for (i=31; i>=24; i--)
|
||||||
fprintf(stderr,"%02x",((uint8_t *)&target)[i]);
|
fprintf(stderr,"%02x",((uint8_t *)&target)[i]);
|
||||||
fprintf(stderr," ht.%d percPoS.%d vs goal.%d -> diff %d\n",height,percPoS,goalperc,goalperc - percPoS);
|
fprintf(stderr," ht.%d percPoS.%d vs goal.%d -> diff %d\n",height,percPoS,goalperc,goalperc - percPoS);
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
else bnTarget = ave; // recent ave is perfect
|
else bnTarget = ave; // recent ave is perfect
|
||||||
return(bnTarget);
|
return(bnTarget);
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ NotarisationsInBlock ScanBlockNotarisations(const CBlock &block, int nHeight)
|
|||||||
printf("ERA.(%d) \n",staked_era);
|
printf("ERA.(%d) \n",staked_era);
|
||||||
if (staked_era == 0) {
|
if (staked_era == 0) {
|
||||||
// this is an ERA GAP, so we will ignore this notarization
|
// this is an ERA GAP, so we will ignore this notarization
|
||||||
printf("Notarization for %s occured inside an ERA GAP, we will ignore it! \n",data.symbol);
|
//printf("Notarization for %s occured inside an ERA GAP, we will ignore it! \n",data.symbol);
|
||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
// pass era slection off to notaries_staked.cpp file
|
// pass era slection off to notaries_staked.cpp file
|
||||||
@@ -52,12 +52,12 @@ NotarisationsInBlock ScanBlockNotarisations(const CBlock &block, int nHeight)
|
|||||||
}
|
}
|
||||||
if (!CheckTxAuthority(tx, auth_STAKED))
|
if (!CheckTxAuthority(tx, auth_STAKED))
|
||||||
continue;
|
continue;
|
||||||
printf("Authorised notarisation data for %s \n",data.symbol);
|
//printf("Authorised notarisation data for %s \n",data.symbol);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (parsed) {
|
if (parsed) {
|
||||||
vNotarisations.push_back(std::make_pair(tx.GetHash(), data));
|
vNotarisations.push_back(std::make_pair(tx.GetHash(), data));
|
||||||
printf("Added notarisation data for %s \n",data.symbol);
|
//printf("Added notarisation data for %s \n",data.symbol);
|
||||||
//printf("Parsed a notarisation for: %s, txid:%s, ccid:%i, momdepth:%i\n",
|
//printf("Parsed a notarisation for: %s, txid:%s, ccid:%i, momdepth:%i\n",
|
||||||
// data.symbol, tx.GetHash().GetHex().data(), data.ccId, data.MoMDepth);
|
// data.symbol, tx.GetHash().GetHex().data(), data.ccId, data.MoMDepth);
|
||||||
//if (!data.MoMoM.IsNull()) printf("MoMoM:%s\n", data.MoMoM.GetHex().data());
|
//if (!data.MoMoM.IsNull()) printf("MoMoM:%s\n", data.MoMoM.GetHex().data());
|
||||||
|
|||||||
Reference in New Issue
Block a user