test
This commit is contained in:
@@ -343,10 +343,18 @@ int32_t komodo_isratify(int32_t isspecial,int32_t numvalid)
|
|||||||
|
|
||||||
void komodo_connectblock(CBlockIndex *pindex,CBlock& block)
|
void komodo_connectblock(CBlockIndex *pindex,CBlock& block)
|
||||||
{
|
{
|
||||||
|
static int32_t hwmheight;
|
||||||
uint64_t signedmask,voutmask;
|
uint64_t signedmask,voutmask;
|
||||||
uint8_t scriptbuf[4096],pubkeys[64][33]; uint256 kmdtxid,btctxid,txhash;
|
uint8_t scriptbuf[4096],pubkeys[64][33]; uint256 kmdtxid,btctxid,txhash;
|
||||||
int32_t i,j,k,numvalid,specialtx,notarizedheight,notaryid,len,numvouts,numvins,height,txn_count;
|
int32_t i,j,k,numvalid,specialtx,notarizedheight,notaryid,len,numvouts,numvins,height,txn_count;
|
||||||
komodo_init();
|
komodo_init();
|
||||||
|
if ( pindex->nHeight > hwmheight )
|
||||||
|
hwmheight = pindex->nHeight;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
printf("hwmheight.%d vs pindex->nHeight.%d reorg.%d\n",hwmheight,pindex->nHeight,hwmheight-pindex->nHeight);
|
||||||
|
// reset komodostate
|
||||||
|
}
|
||||||
if ( ASSETCHAINS_SYMBOL[0] != 0 )
|
if ( ASSETCHAINS_SYMBOL[0] != 0 )
|
||||||
{
|
{
|
||||||
while ( KOMODO_REALTIME == 0 || time(NULL) <= KOMODO_REALTIME )
|
while ( KOMODO_REALTIME == 0 || time(NULL) <= KOMODO_REALTIME )
|
||||||
|
|||||||
@@ -398,6 +398,7 @@ void komodo_gateway_iteration(char *symbol)
|
|||||||
{
|
{
|
||||||
if ( (result= jobj(infoobj,(char *)"result")) != 0 && (kmdheight= jint(result,(char *)"blocks")) != 0 )
|
if ( (result= jobj(infoobj,(char *)"result")) != 0 && (kmdheight= jint(result,(char *)"blocks")) != 0 )
|
||||||
{
|
{
|
||||||
|
printf("gateway KMDHEIGHT.%d kmdheight.%d\n",KMDHEIGHT,kmdheight);
|
||||||
for (i=0; i<1000 && KMDHEIGHT<kmdheight; i++,KMDHEIGHT++)
|
for (i=0; i<1000 && KMDHEIGHT<kmdheight; i++,KMDHEIGHT++)
|
||||||
{
|
{
|
||||||
if ( (KMDHEIGHT % 10) == 0 )
|
if ( (KMDHEIGHT % 10) == 0 )
|
||||||
|
|||||||
Reference in New Issue
Block a user