Test
This commit is contained in:
@@ -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_rwbignum(0,&scriptbuf[len+nameoffset],32,(uint8_t *)&sp->MoM);
|
||||||
len += iguana_rwnum(0,&scriptbuf[len+nameoffset],sizeof(*notarizedheightp),(uint8_t *)&sp->MoMdepth);
|
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 )
|
if ( sp->MoM == zero || sp->MoMdepth > 1440 || sp->MoMdepth < 0 )
|
||||||
{
|
{
|
||||||
memset(&sp->MoM,0,sizeof(sp->MoM));
|
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
|
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);
|
komodo_stateupdate(height,0,0,0,zero,0,0,0,0,0,0,0,0,0,0,sp->MoM,sp->MoMdepth);
|
||||||
|
|||||||
@@ -459,6 +459,7 @@ void komodo_init(int32_t height)
|
|||||||
static int didinit; uint256 zero; int32_t k,n; uint8_t pubkeys[64][33];
|
static int didinit; uint256 zero; int32_t k,n; uint8_t pubkeys[64][33];
|
||||||
if ( 0 && height != 0 )
|
if ( 0 && height != 0 )
|
||||||
printf("komodo_init ht.%d didinit.%d\n",height,didinit);
|
printf("komodo_init ht.%d didinit.%d\n",height,didinit);
|
||||||
|
memset(&zero,0,sizeof(zero));
|
||||||
if ( didinit == 0 )
|
if ( didinit == 0 )
|
||||||
{
|
{
|
||||||
pthread_mutex_init(&komodo_mutex,NULL);
|
pthread_mutex_init(&komodo_mutex,NULL);
|
||||||
@@ -474,7 +475,6 @@ void komodo_init(int32_t height)
|
|||||||
}
|
}
|
||||||
komodo_notarysinit(0,pubkeys,k);
|
komodo_notarysinit(0,pubkeys,k);
|
||||||
}
|
}
|
||||||
memset(&zero,0,sizeof(zero));
|
|
||||||
//for (i=0; i<sizeof(Minerids); i++)
|
//for (i=0; i<sizeof(Minerids); i++)
|
||||||
// Minerids[i] = -2;
|
// Minerids[i] = -2;
|
||||||
didinit = 1;
|
didinit = 1;
|
||||||
@@ -491,7 +491,7 @@ void komodo_init(int32_t height)
|
|||||||
printf("set MAINNET notaries.%d\n",k);
|
printf("set MAINNET notaries.%d\n",k);
|
||||||
komodo_notarysinit(KOMODO_MAINNET_START,pubkeys,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)
|
/*void komodo_assetchain_pubkeys(char *jsonstr)
|
||||||
|
|||||||
@@ -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;
|
double KMDBTC,BTCUSD,CNYUSD; uint32_t numpvals,timestamp,pvals[128]; uint256 zero;
|
||||||
numpvals = dpow_readprices(height,pricefeed,×tamp,&KMDBTC,&BTCUSD,&CNYUSD,pvals);
|
numpvals = dpow_readprices(height,pricefeed,×tamp,&KMDBTC,&BTCUSD,&CNYUSD,pvals);
|
||||||
memset(&zero,0,sizeof(zero));
|
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 )
|
if ( 0 )
|
||||||
{
|
{
|
||||||
int32_t i;
|
int32_t i;
|
||||||
|
|||||||
Reference in New Issue
Block a user