Merge pull request #60 from jl777/acspeed

Acspeed
This commit is contained in:
jl777
2016-11-22 05:48:28 -03:00
committed by GitHub
2 changed files with 8 additions and 5 deletions

View File

@@ -371,6 +371,7 @@ int32_t komodo_voutupdate(int32_t *isratificationp,int32_t notaryid,uint8_t *scr
len += iguana_rwbignum(0,&scriptbuf[len],32,(uint8_t *)&kmdtxid);
len += iguana_rwnum(0,&scriptbuf[len],4,(uint8_t *)notarizedheightp);
len += iguana_rwbignum(0,&scriptbuf[len],32,(uint8_t *)&desttxid);
len += 4;
if ( notarized != 0 && *notarizedheightp > sp->NOTARIZED_HEIGHT && *notarizedheightp < height )
{
printf("%s ht.%d NOTARIZED.%d %s.%s %sTXID.%s (%s)\n",ASSETCHAINS_SYMBOL,height,*notarizedheightp,ASSETCHAINS_SYMBOL[0]==0?"KMD":ASSETCHAINS_SYMBOL,kmdtxid.ToString().c_str(),ASSETCHAINS_SYMBOL[0]==0?"BTC":"KMD",desttxid.ToString().c_str(),(char *)&scriptbuf[len]);
@@ -378,7 +379,7 @@ int32_t komodo_voutupdate(int32_t *isratificationp,int32_t notaryid,uint8_t *scr
sp->NOTARIZED_HASH = kmdtxid;
sp->NOTARIZED_DESTTXID = desttxid;
komodo_stateupdate(height,0,0,0,zero,0,0,0,0,0,0,0,0,0,0);
if ( opretlen > len && scriptbuf[len] == 'A' )
if ( opretlen > len )//&& scriptbuf[len] == 'A' )
{
printf("Found extradata.[%d]\n",opretlen-len);
komodo_stateupdate(height,0,0,0,txhash,0,0,0,0,0,0,value,&scriptbuf[len],opretlen-len,j);
@@ -464,7 +465,6 @@ void komodo_connectblock(CBlockIndex *pindex,CBlock& block)
komodo_stateupdate(pindex->nHeight,0,0,0,zero,0,0,0,0,-pindex->nHeight,pindex->nTime,0,0,0,0);
}
komodo_currentheight_set(chainActive.Tip()->nHeight);
printf("HWM.%d connect.%d\n",chainActive.Tip()->nHeight,pindex->nHeight);
if ( pindex != 0 )
{
height = pindex->nHeight;
@@ -486,7 +486,8 @@ void komodo_connectblock(CBlockIndex *pindex,CBlock& block)
}
}
numvalid = bitweight(signedmask);
printf("%s ht.%d txi.%d signedmask.%llx numvins.%d numvouts.%d <<<<<<<<<<< notarized\n",ASSETCHAINS_SYMBOL,height,i,(long long)signedmask,numvins,numvouts);
if ( height == 79633 )
notarized = 1;
if ( (((height < 90000 || (signedmask & 1) != 0) && numvalid >= KOMODO_MINRATIFY) || bitweight(signedmask) > (numnotaries>>1)) )
{
printf("%s ht.%d txi.%d signedmask.%llx numvins.%d numvouts.%d <<<<<<<<<<< notarized\n",ASSETCHAINS_SYMBOL,height,i,(long long)signedmask,numvins,numvouts);

View File

@@ -535,10 +535,12 @@ int32_t komodo_is_special(int32_t height,uint8_t pubkey33[33])
komodo_chosennotary(&notaryid,height,pubkey33);
if ( height >= 34000 && notaryid >= 0 )
{
if ( height < 79676 )
if ( height < 79693 )
limit = 64;
else if ( height < 82000 )
limit = 36;
else limit = 66;
for (i=1; i<64; i++)
for (i=1; i<limit; i++)
{
if ( komodo_minerid(height-i) == notaryid )
{