Browse Source

test

pull/4/head
jl777 7 years ago
parent
commit
cd586654a5
  1. 9
      src/komodo.h
  2. 2
      src/komodo_bitcoind.h
  3. 16
      src/komodo_interest.h

9
src/komodo.h

@ -416,7 +416,8 @@ int32_t komodo_voutupdate(int32_t *isratificationp,int32_t notaryid,uint8_t *scr
komodo_stateupdate(height,0,0,0,txhash,0,0,0,0,0,0,value,&scriptbuf[len],opretlen-len+4+3+(scriptbuf[1] == 0x4d),j);
}
}
} else printf("notarized.%d %llx reject ht.%d NOTARIZED.%d prev.%d %s.%s DESTTXID.%s (%s)\n",notarized,(long long)signedmask,height,*notarizedheightp,sp->NOTARIZED_HEIGHT,ASSETCHAINS_SYMBOL[0]==0?"KMD":ASSETCHAINS_SYMBOL,kmdtxid.ToString().c_str(),desttxid.ToString().c_str(),(char *)&scriptbuf[len]);
} else if ( height >= KOMODO_MAINNET_START )
printf("notarized.%d %llx reject ht.%d NOTARIZED.%d prev.%d %s.%s DESTTXID.%s (%s)\n",notarized,(long long)signedmask,height,*notarizedheightp,sp->NOTARIZED_HEIGHT,ASSETCHAINS_SYMBOL[0]==0?"KMD":ASSETCHAINS_SYMBOL,kmdtxid.ToString().c_str(),desttxid.ToString().c_str(),(char *)&scriptbuf[len]);
}
else if ( i == 0 && j == 1 && opretlen == 149 )
{
@ -425,9 +426,9 @@ int32_t komodo_voutupdate(int32_t *isratificationp,int32_t notaryid,uint8_t *scr
}
else
{
int32_t k; for (k=0; k<scriptlen; k++)
printf("%02x",scriptbuf[k]);
printf(" <- script ht.%d i.%d j.%d value %.8f %s\n",height,i,j,dstr(value),ASSETCHAINS_SYMBOL);
//int32_t k; for (k=0; k<scriptlen; k++)
// printf("%02x",scriptbuf[k]);
//printf(" <- script ht.%d i.%d j.%d value %.8f %s\n",height,i,j,dstr(value),ASSETCHAINS_SYMBOL);
if ( opretlen >= 32*2+4 && strcmp(ASSETCHAINS_SYMBOL[0]==0?"KMD":ASSETCHAINS_SYMBOL,(char *)&scriptbuf[len+32*2+4]) == 0 )
{
for (k=0; k<32; k++)

2
src/komodo_bitcoind.h

@ -683,7 +683,7 @@ int32_t komodo_checkpoint(int32_t *notarized_heightp,int32_t nHeight,uint256 has
return(-1);
}
} else fprintf(stderr,"unexpected error notary_hash %s ht.%d at ht.%d\n",notarized_hash.ToString().c_str(),notarized_height,notary->nHeight);
} else if ( notarized_height > 0 && notarized_height != 73880 )
} else if ( notarized_height > 0 && notarized_height != 73880 && notarized_height >= KOMODO_MAINNET_START )
fprintf(stderr,"[%s] couldnt find notarized.(%s %d) ht.%d\n",ASSETCHAINS_SYMBOL,notarized_hash.ToString().c_str(),notarized_height,pindex->nHeight);
return(0);
}

16
src/komodo_interest.h

@ -78,9 +78,21 @@ uint64_t komodo_interest(int32_t txheight,uint64_t nValue,uint32_t nLockTime,uin
if ( nValue > 25000LL*COIN )
{
exception = 0;
//if ( txheight <= 155949 )
if ( txheight <= 155949 )
{
printf(">>>>>>>>>>>> txheight.%d %.8f locktime %u vs tiptime %u <<<<<<<<<\n",txheight,(double)nValue/COIN,nLockTime,tiptime);
if ( (txheight == 116607 && nValue == 2502721100000LL) ||
(txheight == 126891 && nValue == 2879650000000) ||
(txheight == 129510 && nValue == 3000000000000) ||
(txheight == 141549 && nValue == 3500000000000) ||
(txheight == 154473 && nValue == 3983399350000) ||
(txheight == 154736 && nValue == 3983406748175) ||
(txheight == 155013 && nValue == 3983414006565) ||
(txheight == 155492 && nValue == 3983427592291) ||
(txheight == 155613 && nValue == 9997409999999797) ||
(txheight == 157927 && nValue == 9997410667451072) ||
(txheight == 155613 && nValue == 2590000000000) )
exception = 1;
printf(">>>>>>>>>>>> exception.%d txheight.%d %.8f locktime %u vs tiptime %u <<<<<<<<<\n",exception,txheight,(double)nValue/COIN,nLockTime,tiptime);
}
if ( exception == 0 )
{

Loading…
Cancel
Save