This commit is contained in:
jl777
2016-11-07 09:16:20 -03:00
parent 0f0d8331c4
commit 6458297e30
3 changed files with 7 additions and 5 deletions

View File

@@ -152,7 +152,7 @@ void komodo_stateupdate(int32_t height,uint8_t notarypubs[][33],uint8_t numnotar
} }
if ( height <= 0 ) if ( height <= 0 )
{ {
printf("early return: stateupdate height.%d\n",height); //printf("early return: stateupdate height.%d\n",height);
return; return;
} }
if ( fp != 0 ) // write out funcid, height, other fields, call side effect function if ( fp != 0 ) // write out funcid, height, other fields, call side effect function

View File

@@ -174,10 +174,10 @@ void komodo_gateway_deposits(CMutableTransaction *txNew,int32_t shortflag,char *
} }
data[len++] = pax->vout & 0xff; data[len++] = pax->vout & 0xff;
data[len++] = (pax->vout >> 8) & 0xff; data[len++] = (pax->vout >> 8) & 0xff;
printf(" vout.%u DEPOSIT %.8f <- paxdeposit.%s\n",pax->vout,(double)txNew->vout[numvouts].nValue/COIN,symbol);
if ( strcmp(symbol,"KMD") != 0 ) if ( strcmp(symbol,"KMD") != 0 )
PENDING_KOMODO_TX += pax->fiatoshis; PENDING_KOMODO_TX += pax->fiatoshis;
else PENDING_KOMODO_TX += pax->komodoshis; else PENDING_KOMODO_TX += pax->komodoshis;
printf(" vout.%u DEPOSIT %.8f <- paxdeposit.%s pending %.8f\n",pax->vout,(double)txNew->vout[numvouts].nValue/COIN,symbol,dstr(PENDING_KOMODO_TX));
if ( numvouts++ >= 64 ) if ( numvouts++ >= 64 )
break; break;
tmp = pax; tmp = pax;
@@ -470,7 +470,8 @@ void komodo_gateway_iteration(char *symbol)
printf("error from %s\n",symbol); printf("error from %s\n",symbol);
sleep(30); sleep(30);
} }
KOMODO_DEPOSIT = komodo_paxtotal(); if ( (KOMODO_DEPOSIT= komodo_paxtotal()) != 0 )
printf("KOMODO_DEPOSIT %.8f RT.%u\n",dstr(KOMODO_DEPOSIT),KOMODO_REALTIME);
} }
void komodo_iteration(char *symbol) void komodo_iteration(char *symbol)

View File

@@ -113,6 +113,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
if(!pblocktemplate.get()) if(!pblocktemplate.get())
return NULL; return NULL;
CBlock *pblock = &pblocktemplate->block; // pointer for convenience CBlock *pblock = &pblocktemplate->block; // pointer for convenience
fprintf(stderr,"CreateNewBlock initdone.%d deposit %.8f\n",KOMODO_INITDONE,dstr(KOMODO_DEPOSIT));
while ( chainActive.Tip()->nHeight > ASSETCHAINS_MINHEIGHT && mempool.GetTotalTxSize() <= 0 ) while ( chainActive.Tip()->nHeight > ASSETCHAINS_MINHEIGHT && mempool.GetTotalTxSize() <= 0 )
{ {
sleep(10); sleep(10);
@@ -442,7 +443,7 @@ int32_t komodo_chosennotary(int32_t *notaryidp,int32_t height,uint8_t *pubkey33)
CBlockTemplate* CreateNewBlockWithKey(CReserveKey& reservekey) CBlockTemplate* CreateNewBlockWithKey(CReserveKey& reservekey)
{ {
CPubKey pubkey; CScript scriptPubKey; uint8_t *script,*ptr; int32_t i; CPubKey pubkey; CScript scriptPubKey; uint8_t *script,*ptr; int32_t i;
//fprintf(stderr,"%s createnewblockwith key\n",ASSETCHAINS_SYMBOL); fprintf(stderr,"%s createnewblockwith key\n",ASSETCHAINS_SYMBOL);
if ( USE_EXTERNAL_PUBKEY != 0 ) if ( USE_EXTERNAL_PUBKEY != 0 )
{ {
//fprintf(stderr,"use notary pubkey\n"); //fprintf(stderr,"use notary pubkey\n");
@@ -557,7 +558,7 @@ void static BitcoinMiner(CWallet *pwallet)
} while (true); } while (true);
//fprintf(stderr,"%s Found peers\n",ASSETCHAINS_SYMBOL); //fprintf(stderr,"%s Found peers\n",ASSETCHAINS_SYMBOL);
} }
//fprintf(stderr,"%s create new block\n",ASSETCHAINS_SYMBOL); fprintf(stderr,"%s create new block\n",ASSETCHAINS_SYMBOL);
// //
// Create new block // Create new block
// //