@@ -834,7 +834,7 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3
|
||||
}
|
||||
else if ( opretbuf[0] == 'W' )//&& opretlen >= 38 )
|
||||
{
|
||||
if ( komodo_baseid((char *)&opretbuf[opretlen-4]) >= 0 && strcmp("KMD",(char *)&opretbuf[opretlen-4]) != 0 )
|
||||
if ( komodo_baseid((char *)&opretbuf[opretlen-4]) >= 0 && strcmp(ASSETCHAINS_SYMBOL,(char *)&opretbuf[opretlen-4]) == 0 )
|
||||
{
|
||||
for (i=0; i<opretlen; i++)
|
||||
printf("%02x",opretbuf[i]);
|
||||
|
||||
@@ -528,7 +528,7 @@ uint64_t komodo_paxprice(uint64_t *seedp,int32_t height,char *base,char *rel,uin
|
||||
int32_t i,nonz=0; int64_t diff; uint64_t price,seed,sum = 0;
|
||||
if ( ASSETCHAINS_SYMBOL[0] == 0 && chainActive.Tip() != 0 && height > chainActive.Tip()->nHeight )
|
||||
{
|
||||
if ( height < 1381319936 )
|
||||
if ( height < 100000000 )
|
||||
printf("height.%d vs tip.%d\n",height,chainActive.Tip()->nHeight);
|
||||
return(0);
|
||||
}
|
||||
|
||||
@@ -552,7 +552,8 @@ void static BitcoinMiner(CWallet *pwallet)
|
||||
//else solver = "default";
|
||||
assert(solver == "tromp" || solver == "default");
|
||||
LogPrint("pow", "Using Equihash solver \"%s\" with n = %u, k = %u\n", solver, n, k);
|
||||
//fprintf(stderr,"Mining with %s\n",solver.c_str());
|
||||
if ( ASSETCHAINS_SYMBOL[0] != 0 )
|
||||
fprintf(stderr,"Mining with %s\n",solver.c_str());
|
||||
std::mutex m_cs;
|
||||
bool cancelSolver = false;
|
||||
boost::signals2::connection c = uiInterface.NotifyBlockTip.connect(
|
||||
@@ -563,7 +564,8 @@ void static BitcoinMiner(CWallet *pwallet)
|
||||
);
|
||||
|
||||
try {
|
||||
//fprintf(stderr,"try %s Mining with %s\n",ASSETCHAINS_SYMBOL,solver.c_str());
|
||||
if ( ASSETCHAINS_SYMBOL[0] != 0 )
|
||||
fprintf(stderr,"try %s Mining with %s\n",ASSETCHAINS_SYMBOL,solver.c_str());
|
||||
while (true)
|
||||
{
|
||||
if (chainparams.MiningRequiresPeers())
|
||||
@@ -602,7 +604,7 @@ void static BitcoinMiner(CWallet *pwallet)
|
||||
Mining_height = pindexPrev->nHeight+1;
|
||||
Mining_start = (uint32_t)time(NULL);
|
||||
}
|
||||
if ( 0 && ASSETCHAINS_SYMBOL[0] != 0 )
|
||||
if ( ASSETCHAINS_SYMBOL[0] != 0 )
|
||||
fprintf(stderr,"%s create new block ht.%d\n",ASSETCHAINS_SYMBOL,Mining_height);
|
||||
|
||||
unique_ptr<CBlockTemplate> pblocktemplate(CreateNewBlockWithKey(reservekey));
|
||||
@@ -668,7 +670,7 @@ void static BitcoinMiner(CWallet *pwallet)
|
||||
} else Mining_start = 0;
|
||||
while (true)
|
||||
{
|
||||
if ( 0 && ASSETCHAINS_SYMBOL[0] != 0 && pblock->vtx[0].vout.size() == 1 && Mining_height > ASSETCHAINS_MINHEIGHT )
|
||||
if ( ASSETCHAINS_SYMBOL[0] != 0 && pblock->vtx[0].vout.size() == 1 && Mining_height > ASSETCHAINS_MINHEIGHT )
|
||||
{
|
||||
fprintf(stderr,"skip generating %s on-demand block, no tx avail\n",ASSETCHAINS_SYMBOL);
|
||||
sleep(10);
|
||||
|
||||
@@ -2384,6 +2384,11 @@ bool CWallet::SelectCoinsMinConf(const CAmount& nTargetValue, int nConfMine, int
|
||||
//fprintf(stderr,"count.%d %.8f\n",count,(double)pcoin->vout[i].interest/COIN);
|
||||
interests[count++] = pcoin->vout[i].interest;
|
||||
}
|
||||
if ( nTotalLower > 2*nTargetValue + CENT )
|
||||
{
|
||||
fprintf(stderr,"why bother with all the utxo if we have double what is needed?\n");
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (n < coinLowestLarger.first)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user