Browse Source

Test

pull/4/head
jl777 6 years ago
parent
commit
2ff8e0e5d9
  1. 4
      src/komodo.h
  2. 4
      src/komodo_notary.h
  3. 2
      src/komodo_pax.h

4
src/komodo.h

@ -579,7 +579,7 @@ int32_t komodo_voutupdate(int32_t *isratificationp,int32_t notaryid,uint8_t *scr
{
len += iguana_rwbignum(0,&scriptbuf[len+nameoffset],32,(uint8_t *)&sp->MoM);
len += iguana_rwnum(0,&scriptbuf[len+nameoffset],sizeof(*notarizedheightp),(uint8_t *)&sp->MoMdepth);
printf("%s MoM.%s [%d]\n",ASSETCHAINS_SYMBOL,sp->MoM.ToString().c_str(),sp->M<oMdepth);
printf("%s MoM.%s [%d]\n",ASSETCHAINS_SYMBOL,sp->MoM.ToString().c_str(),sp->MoMdepth);
if ( sp->MoM == zero || sp->MoMdepth > 1440 || sp->MoMdepth < 0 )
{
memset(&sp->MoM,0,sizeof(sp->MoM));
@ -587,7 +587,7 @@ int32_t komodo_voutupdate(int32_t *isratificationp,int32_t notaryid,uint8_t *scr
}
else
{
printf("VALID %s MoM.%s [%d]\n",ASSETCHAINS_SYMBOL,sp->MoM.ToString().c_str(),sp->M<oMdepth);
printf("VALID %s MoM.%s [%d]\n",ASSETCHAINS_SYMBOL,sp->MoM.ToString().c_str(),sp->MoMdepth);
}
}
komodo_stateupdate(height,0,0,0,zero,0,0,0,0,0,0,0,0,0,0,sp->MoM,sp->MoMdepth);

4
src/komodo_notary.h

@ -459,6 +459,7 @@ void komodo_init(int32_t height)
static int didinit; uint256 zero; int32_t k,n; uint8_t pubkeys[64][33];
if ( 0 && height != 0 )
printf("komodo_init ht.%d didinit.%d\n",height,didinit);
memset(&zero,0,sizeof(zero));
if ( didinit == 0 )
{
pthread_mutex_init(&komodo_mutex,NULL);
@ -474,7 +475,6 @@ void komodo_init(int32_t height)
}
komodo_notarysinit(0,pubkeys,k);
}
memset(&zero,0,sizeof(zero));
//for (i=0; i<sizeof(Minerids); i++)
// Minerids[i] = -2;
didinit = 1;
@ -491,7 +491,7 @@ void komodo_init(int32_t height)
printf("set MAINNET notaries.%d\n",k);
komodo_notarysinit(KOMODO_MAINNET_START,pubkeys,k);
}*/
komodo_stateupdate(0,0,0,0,zero,0,0,0,0,0,0,0,0,0,0);
komodo_stateupdate(0,0,0,0,zero,0,0,0,0,0,0,0,0,0,0,zero,0);
}
/*void komodo_assetchain_pubkeys(char *jsonstr)

2
src/komodo_pax.h

@ -709,7 +709,7 @@ void komodo_paxpricefeed(int32_t height,uint8_t *pricefeed,int32_t opretlen)
double KMDBTC,BTCUSD,CNYUSD; uint32_t numpvals,timestamp,pvals[128]; uint256 zero;
numpvals = dpow_readprices(height,pricefeed,&timestamp,&KMDBTC,&BTCUSD,&CNYUSD,pvals);
memset(&zero,0,sizeof(zero));
komodo_stateupdate(height,0,0,0,zero,0,0,pvals,numpvals,0,0,0,0,0,0);
komodo_stateupdate(height,0,0,0,zero,0,0,pvals,numpvals,0,0,0,0,0,0,zero,0);
if ( 0 )
{
int32_t i;

Loading…
Cancel
Save