Browse Source

test

pull/4/head
jl777 8 years ago
parent
commit
6458297e30
  1. 2
      src/komodo.h
  2. 5
      src/komodo_gateway.h
  3. 5
      src/miner.cpp

2
src/komodo.h

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

5
src/komodo_gateway.h

@ -174,10 +174,10 @@ void komodo_gateway_deposits(CMutableTransaction *txNew,int32_t shortflag,char *
}
data[len++] = pax->vout & 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 )
PENDING_KOMODO_TX += pax->fiatoshis;
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 )
break;
tmp = pax;
@ -470,7 +470,8 @@ void komodo_gateway_iteration(char *symbol)
printf("error from %s\n",symbol);
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)

5
src/miner.cpp

@ -113,6 +113,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
if(!pblocktemplate.get())
return NULL;
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 )
{
sleep(10);
@ -442,7 +443,7 @@ int32_t komodo_chosennotary(int32_t *notaryidp,int32_t height,uint8_t *pubkey33)
CBlockTemplate* CreateNewBlockWithKey(CReserveKey& reservekey)
{
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 )
{
//fprintf(stderr,"use notary pubkey\n");
@ -557,7 +558,7 @@ void static BitcoinMiner(CWallet *pwallet)
} while (true);
//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
//

Loading…
Cancel
Save