20
src/komodo.h
20
src/komodo.h
@@ -159,7 +159,13 @@ int32_t komodo_parsestatefile(struct komodo_state *sp,FILE *fp,char *symbol,char
|
||||
printf(" %s.%d load[%s] opret[%c] len.%d %.8f\n",ASSETCHAINS_SYMBOL,ht,symbol,opret[0],olen,(double)ovalue/COIN);
|
||||
}
|
||||
komodo_eventadd_opreturn(sp,symbol,ht,txid,ovalue,v,opret,olen); // global shared state -> global PAX
|
||||
} else printf("illegal olen.%u\n",olen);
|
||||
} else
|
||||
{
|
||||
int32_t i;
|
||||
for (i=0; i<olen; i++)
|
||||
fgetc(fp);
|
||||
printf("illegal olen.%u\n",olen);
|
||||
}
|
||||
}
|
||||
else if ( func == 'D' )
|
||||
{
|
||||
@@ -371,7 +377,6 @@ 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]);
|
||||
@@ -379,9 +384,10 @@ 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);
|
||||
len += 4;
|
||||
if ( opretlen > len )//&& scriptbuf[len] == 'A' )
|
||||
{
|
||||
printf("Found extradata.[%d]\n",opretlen-len);
|
||||
printf("Found extradata.[%d] %d - %d\n",opretlen-len,opretlen,len);
|
||||
komodo_stateupdate(height,0,0,0,txhash,0,0,0,0,0,0,value,&scriptbuf[len],opretlen-len,j);
|
||||
}
|
||||
} else printf("notarized.%d %llx reject ht.%d NOTARIZED.%d %s.%s DESTTXID.%s (%s)\n",notarized,(long long)signedmask,height,*notarizedheightp,ASSETCHAINS_SYMBOL[0]==0?"KMD":ASSETCHAINS_SYMBOL,kmdtxid.ToString().c_str(),desttxid.ToString().c_str(),(char *)&scriptbuf[len]);
|
||||
@@ -486,8 +492,8 @@ void komodo_connectblock(CBlockIndex *pindex,CBlock& block)
|
||||
}
|
||||
}
|
||||
numvalid = bitweight(signedmask);
|
||||
if ( height == 79633 )
|
||||
notarized = 1;
|
||||
//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);
|
||||
@@ -514,8 +520,8 @@ void komodo_connectblock(CBlockIndex *pindex,CBlock& block)
|
||||
}
|
||||
if ( notarized != 0 && (notarizedheight != 0 || specialtx != 0) )
|
||||
{
|
||||
printf("%s NOTARY SIGNED.%llx numvins.%d ht.%d txi.%d notaryht.%d specialtx.%d\n",ASSETCHAINS_SYMBOL,(long long)signedmask,numvins,height,i,notarizedheight,specialtx);
|
||||
printf("ht.%d specialtx.%d isratification.%d numvouts.%d signed.%llx numnotaries.%d\n",height,specialtx,isratification,numvouts,(long long)signedmask,numnotaries);
|
||||
//printf("%s NOTARY SIGNED.%llx numvins.%d ht.%d txi.%d notaryht.%d specialtx.%d\n",ASSETCHAINS_SYMBOL,(long long)signedmask,numvins,height,i,notarizedheight,specialtx);
|
||||
//printf("ht.%d specialtx.%d isratification.%d numvouts.%d signed.%llx numnotaries.%d\n",height,specialtx,isratification,numvouts,(long long)signedmask,numnotaries);
|
||||
if ( specialtx != 0 && isratification != 0 && numvouts > 2 )
|
||||
{
|
||||
numvalid = 0;
|
||||
|
||||
@@ -480,7 +480,7 @@ void komodo_passport_iteration()
|
||||
else refid = komodo_baseid(ASSETCHAINS_SYMBOL)+1; // illegal base -> baseid.-1 -> 0
|
||||
//printf("PASSPORT %s refid.%d\n",ASSETCHAINS_SYMBOL,refid);
|
||||
for (baseid=0; baseid<=32; baseid++)
|
||||
{
|
||||
{break;
|
||||
sp = 0;
|
||||
isrealtime = 0;
|
||||
base = (char *)CURRENCIES[baseid];
|
||||
|
||||
Reference in New Issue
Block a user