|
|
@ -90,22 +90,16 @@ int32_t gettxout_scriptPubKey(int32_t height,uint8_t *scriptPubKey,int32_t maxsi |
|
|
|
{ |
|
|
|
if ( GetTransaction(txid,tx,hashBlock,false) == 0 ) |
|
|
|
{ |
|
|
|
fprintf(stderr,"ht.%d couldnt get txid.%s !\n",height,txid.GetHex().c_str()); |
|
|
|
LogPrint("dpow","ht.%d couldnt get txid.%s !\n",height,txid.GetHex().c_str()); |
|
|
|
return(-1); |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
CWallet * const pwallet = vpwallets[0]; |
|
|
|
if ( pwallet != 0 ) |
|
|
|
if ( GetTransaction(txid,tx,hashBlock,true) == 0 ) |
|
|
|
{ |
|
|
|
auto it = pwallet->mapWallet.find(txid); |
|
|
|
if ( it != pwallet->mapWallet.end() ) |
|
|
|
{ |
|
|
|
const CWalletTx& wtx = it->second; |
|
|
|
tx = *wtx.tx; |
|
|
|
fprintf(stderr,"found tx in wallet\n"); |
|
|
|
} |
|
|
|
LogPrint("dpow","ht.%d couldnt get txid.%s !\n",height,txid.GetHex().c_str()); |
|
|
|
return(-1); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -117,11 +111,11 @@ int32_t gettxout_scriptPubKey(int32_t height,uint8_t *scriptPubKey,int32_t maxsi |
|
|
|
for (i=0; i<maxsize&&i<m; i++) { |
|
|
|
scriptPubKey[i] = ptr[i]; |
|
|
|
} |
|
|
|
fprintf(stderr,"got scriptPubKey[%d] via rawtransaction ht.%d %s\n",m,height,txid.GetHex().c_str()); |
|
|
|
LogPrint("dpow","got scriptPubKey[%d] via rawtransaction ht.%d %s\n",m,height,txid.GetHex().c_str()); |
|
|
|
return(i); |
|
|
|
} |
|
|
|
else if ( !tx.IsNull() ) |
|
|
|
fprintf(stderr,"gettxout_scriptPubKey ht.%d n.%d > voutsize.%d\n",height,n,(int32_t)tx.vout.size()); |
|
|
|
LogPrint("dpow","gettxout_scriptPubKey ht.%d n.%d > voutsize.%d\n",height,n,(int32_t)tx.vout.size()); |
|
|
|
|
|
|
|
return(-1); |
|
|
|
} |
|
|
@ -148,7 +142,7 @@ int32_t komodo_importaddress(std::string addr) |
|
|
|
return(1); |
|
|
|
} |
|
|
|
} |
|
|
|
printf("%s -> komodo_importaddress failed valid.%d\n",addr.c_str(),address.IsValid()); |
|
|
|
LogPrint("dpow","%s -> komodo_importaddress failed valid.%d\n",addr.c_str(),address.IsValid()); |
|
|
|
} |
|
|
|
return(-1); |
|
|
|
} |
|
|
@ -520,7 +514,7 @@ int32_t decode_hex(uint8_t *bytes,int32_t n,char *hex) |
|
|
|
if ( n > 0 ) |
|
|
|
{ |
|
|
|
bytes[0] = unhex(hex[0]); |
|
|
|
printf("decode_hex n.%d hex[0] (%c) -> %d hex.(%s) [n*2+1: %d] [n*2: %d %c] len.%ld\n",n,hex[0],bytes[0],hex,hex[n*2+1],hex[n*2],hex[n*2],(long)strlen(hex)); |
|
|
|
LogPrint("dpow","decode_hex n.%d hex[0] (%c) -> %d hex.(%s) [n*2+1: %d] [n*2: %d %c] len.%ld\n",n,hex[0],bytes[0],hex,hex[n*2+1],hex[n*2],hex[n*2],(long)strlen(hex)); |
|
|
|
} |
|
|
|
bytes++; |
|
|
|
hex++; |
|
|
@ -578,9 +572,9 @@ CBlockIndex *komodo_chainactive(int32_t height) |
|
|
|
{ |
|
|
|
if ( height <= tipindex->nHeight ) |
|
|
|
return(chainActive[height]); |
|
|
|
else fprintf(stderr,"komodo_chainactive height %d > active.%d\n",height,chainActive.Tip()->nHeight); |
|
|
|
else LogPrint("dpow","komodo_chainactive height %d > active.%d\n",height,chainActive.Tip()->nHeight); |
|
|
|
} |
|
|
|
fprintf(stderr,"komodo_chainactive null chainActive.Tip() height %d\n",height); |
|
|
|
LogPrint("dpow","komodo_chainactive null chainActive.Tip() height %d\n",height); |
|
|
|
return(0); |
|
|
|
} |
|
|
|
|
|
|
@ -589,7 +583,7 @@ uint32_t komodo_heightstamp(int32_t height) |
|
|
|
CBlockIndex *ptr; |
|
|
|
if ( height > 0 && (ptr= komodo_chainactive(height)) != 0 ) |
|
|
|
return(ptr->nTime); |
|
|
|
else fprintf(stderr,"komodo_heightstamp null ptr for block.%d\n",height); |
|
|
|
else LogPrint("dpow","komodo_heightstamp null ptr for block.%d\n",height); |
|
|
|
return(0); |
|
|
|
} |
|
|
|
|
|
|
@ -760,13 +754,13 @@ void komodo_importpubkeys() |
|
|
|
//fprintf(stderr,"pubkey=%s, addr=%s\n", pubkey, addr.c_str() );
|
|
|
|
|
|
|
|
if ( (val= komodo_importaddress(addr)) < 0 ) |
|
|
|
LogPrintf("dpow: error importing (%s)\n",addr.c_str()); |
|
|
|
LogPrint("dpow","dpow: error importing (%s)\n",addr.c_str()); |
|
|
|
else if ( val == 0 ) |
|
|
|
dispflag++; |
|
|
|
} |
|
|
|
} |
|
|
|
if ( dispflag != 0 ) |
|
|
|
fprintf(stderr,"%d Notary pubkeys imported\n",dispflag); |
|
|
|
LogPrint("dpow","%d Notary pubkeys imported\n",dispflag); |
|
|
|
} |
|
|
|
|
|
|
|
int32_t komodo_init() |
|
|
@ -847,7 +841,7 @@ int32_t komodo_notaries(uint8_t pubkeys[64][33],int32_t height,uint32_t timestam |
|
|
|
} |
|
|
|
memcpy(pubkeys,elected_pubkeys0,n0 * 33); |
|
|
|
if ( ASSETCHAINS_SYMBOL[0] != 0 ) |
|
|
|
fprintf(stderr,"%s height.%d t.%u elected.%d notaries\n",ASSETCHAINS_SYMBOL,height,timestamp,n0); |
|
|
|
LogPrint("dpow","%s height.%d t.%u elected.%d notaries\n",ASSETCHAINS_SYMBOL,height,timestamp,n0); |
|
|
|
return(n0); |
|
|
|
} |
|
|
|
else //if ( (timestamp != 0 && timestamp <= KOMODO_NOTARIES_TIMESTAMP2) || height <= KOMODO_NOTARIES_HEIGHT2 )
|
|
|
@ -858,7 +852,7 @@ int32_t komodo_notaries(uint8_t pubkeys[64][33],int32_t height,uint32_t timestam |
|
|
|
for (i=0; i<n1; i++) |
|
|
|
decode_hex(elected_pubkeys1[i],33,(char *)Notaries_elected1[i][1]); |
|
|
|
if ( ASSETCHAINS_SYMBOL[0] != 0 ) |
|
|
|
fprintf(stderr,"%s height.%d t.%u elected.%d notaries2\n",ASSETCHAINS_SYMBOL,height,timestamp,n1); |
|
|
|
LogPrint("dpow","%s height.%d t.%u elected.%d notaries2\n",ASSETCHAINS_SYMBOL,height,timestamp,n1); |
|
|
|
did1 = 1; |
|
|
|
} |
|
|
|
memcpy(pubkeys,elected_pubkeys1,n1 * 33); |
|
|
@ -884,7 +878,7 @@ void komodo_disconnect(CBlockIndex *pindex,CBlock *block) |
|
|
|
{ |
|
|
|
if ( (int32_t)pindex->nHeight <= NOTARIZED_HEIGHT ) |
|
|
|
{ |
|
|
|
fprintf(stderr,"komodo_disconnect unexpected reorg pindex->nHeight.%d vs %d\n",(int32_t)pindex->nHeight,NOTARIZED_HEIGHT); |
|
|
|
LogPrint("dpow","komodo_disconnect unexpected reorg pindex->nHeight.%d vs %d\n",(int32_t)pindex->nHeight,NOTARIZED_HEIGHT); |
|
|
|
komodo_clearstate(); // bruteforce shortcut. on any reorg, no active notarization until next one is seen
|
|
|
|
} |
|
|
|
} |
|
|
@ -960,7 +954,7 @@ int32_t komodo_notarizeddata(int32_t nHeight,uint256 *notarized_hashp,uint256 *n |
|
|
|
{ |
|
|
|
if ( NPOINTS[i].nHeight >= nHeight ) |
|
|
|
{ |
|
|
|
LogPrintf("dpow: flag.1 i.%d np->ht %d [%d].ht %d >= nHeight.%d, last.%d num.%d\n",i,np->nHeight,i,NPOINTS[i].nHeight,nHeight,last_NPOINTSi,NUM_NPOINTS); |
|
|
|
LogPrint("dpow","dpow: flag.1 i.%d np->ht %d [%d].ht %d >= nHeight.%d, last.%d num.%d\n",i,np->nHeight,i,NPOINTS[i].nHeight,nHeight,last_NPOINTSi,NUM_NPOINTS); |
|
|
|
flag = 1; |
|
|
|
break; |
|
|
|
} |
|
|
@ -987,7 +981,7 @@ int32_t komodo_notarizeddata(int32_t nHeight,uint256 *notarized_hashp,uint256 *n |
|
|
|
if ( np != 0 ) |
|
|
|
{ |
|
|
|
if ( np->nHeight >= nHeight || (i < NUM_NPOINTS && np[1].nHeight < nHeight) ) |
|
|
|
fprintf(stderr,"warning: flag.%d i.%d np->ht %d [1].ht %d >= nHeight.%d\n",flag,i,np->nHeight,np[1].nHeight,nHeight); |
|
|
|
LogPrint("dpow","warning: flag.%d i.%d np->ht %d [1].ht %d >= nHeight.%d\n",flag,i,np->nHeight,np[1].nHeight,nHeight); |
|
|
|
*notarized_hashp = np->notarized_hash; |
|
|
|
*notarized_desttxidp = np->notarized_desttxid; |
|
|
|
return(np->notarized_height); |
|
|
@ -1013,7 +1007,7 @@ void komodo_notarized_update(int32_t nHeight,int32_t notarized_height,uint256 no |
|
|
|
sep = "/"; |
|
|
|
#endif |
|
|
|
sprintf(fname,"%s%snotarizations%s",GetDefaultDataDir().string().c_str(), sep.c_str(), suffix.c_str()); |
|
|
|
LogPrintf("dpow: fname.(%s)\n",fname); |
|
|
|
LogPrint("dpow","dpow: fname.(%s)\n",fname); |
|
|
|
if ( (fp= fopen(fname,"rb+")) == 0 ) |
|
|
|
fp = fopen(fname,"wb+"); |
|
|
|
else |
|
|
@ -1036,12 +1030,12 @@ void komodo_notarized_update(int32_t nHeight,int32_t notarized_height,uint256 no |
|
|
|
NOTARIZED_MOMDEPTH = np->MoMdepth; |
|
|
|
//fprintf(stderr,"%d ",np->notarized_height);
|
|
|
|
fpos = ftell(fp); |
|
|
|
} else LogPrintf("dpow: %s error with notarization ht.%d %s\n",ASSETCHAINS_SYMBOL,N.notarized_height,pindex->GetBlockHash().ToString().c_str()); |
|
|
|
} else LogPrint("dpow","dpow: %s error with notarization ht.%d %s\n",ASSETCHAINS_SYMBOL,N.notarized_height,pindex->GetBlockHash().ToString().c_str()); |
|
|
|
} |
|
|
|
if ( ftell(fp) != fpos ) |
|
|
|
fseek(fp,fpos,SEEK_SET); |
|
|
|
} |
|
|
|
LogPrintf("dpow: finished loading %s [pubkey %s]\n",fname,NOTARY_PUBKEY.c_str()); |
|
|
|
LogPrint("dpow","dpow: finished loading %s [pubkey %s]\n",fname,NOTARY_PUBKEY.c_str()); |
|
|
|
didinit = 1; |
|
|
|
} |
|
|
|
if ( notarized_height == 0 ) |
|
|
@ -1051,16 +1045,16 @@ void komodo_notarized_update(int32_t nHeight,int32_t notarized_height,uint256 no |
|
|
|
} |
|
|
|
if ( notarized_height >= nHeight ) |
|
|
|
{ |
|
|
|
LogPrintf("dpow: komodo_notarized_update REJECT notarized_height %d > %d nHeight\n",notarized_height,nHeight); |
|
|
|
LogPrint("dpow","dpow: komodo_notarized_update REJECT notarized_height %d > %d nHeight\n",notarized_height,nHeight); |
|
|
|
return; |
|
|
|
} |
|
|
|
pindex = komodo_chainactive(notarized_height); |
|
|
|
if ( pindex == 0 || pindex->GetBlockHash() != notarized_hash || notarized_height != pindex->nHeight ) |
|
|
|
{ |
|
|
|
LogPrintf("dpow: komodo_notarized_update reject nHeight.%d notarized_height.%d:%d\n",nHeight,notarized_height,(int32_t)pindex->nHeight); |
|
|
|
LogPrint("dpow","dpow: komodo_notarized_update reject nHeight.%d notarized_height.%d:%d\n",nHeight,notarized_height,(int32_t)pindex->nHeight); |
|
|
|
return; |
|
|
|
} |
|
|
|
LogPrintf("dpow: komodo_notarized_update nHeight.%d notarized_height.%d prev.%d\n",nHeight,notarized_height,NPOINTS!=0?NPOINTS[NUM_NPOINTS-1].notarized_height:-1); |
|
|
|
LogPrint("dpow","dpow: komodo_notarized_update nHeight.%d notarized_height.%d prev.%d\n",nHeight,notarized_height,NPOINTS!=0?NPOINTS[NUM_NPOINTS-1].notarized_height:-1); |
|
|
|
portable_mutex_lock(&komodo_mutex); |
|
|
|
NPOINTS = (struct notarized_checkpoint *)realloc(NPOINTS,(NUM_NPOINTS+1) * sizeof(*NPOINTS)); |
|
|
|
np = &NPOINTS[NUM_NPOINTS++]; |
|
|
@ -1069,7 +1063,7 @@ void komodo_notarized_update(int32_t nHeight,int32_t notarized_height,uint256 no |
|
|
|
NOTARIZED_HEIGHT = np->notarized_height = notarized_height; |
|
|
|
NOTARIZED_HASH = np->notarized_hash = notarized_hash; |
|
|
|
NOTARIZED_DESTTXID = np->notarized_desttxid = notarized_desttxid; |
|
|
|
LogPrintf("dpow: komodo_notarized_update NOTARIZED (HEIGHT,HASH,DESTTXID) = (%d, %s, %s)\n", NOTARIZED_HEIGHT, NOTARIZED_HASH.GetHex().c_str(), NOTARIZED_DESTTXID.GetHex().c_str()); |
|
|
|
//LogPrintf("dpow: NOTARIZED (HEIGHT,HASH,DESTTXID) = (%d, %s, %s)\n", NOTARIZED_HEIGHT, NOTARIZED_HASH.GetHex().c_str(), NOTARIZED_DESTTXID.GetHex().c_str());
|
|
|
|
if ( MoM != zero && MoMdepth > 0 ) |
|
|
|
{ |
|
|
|
NOTARIZED_MOM = np->MoM = MoM; |
|
|
@ -1079,7 +1073,7 @@ void komodo_notarized_update(int32_t nHeight,int32_t notarized_height,uint256 no |
|
|
|
{ |
|
|
|
if ( fwrite(np,1,sizeof(*np),fp) == sizeof(*np) ) |
|
|
|
fflush(fp); |
|
|
|
else LogPrintf("dpow: error writing notarization to %d\n",(int32_t)ftell(fp)); |
|
|
|
else LogPrint("dpow","dpow: error writing notarization to %d\n",(int32_t)ftell(fp)); |
|
|
|
} |
|
|
|
// add to stored notarizations
|
|
|
|
portable_mutex_unlock(&komodo_mutex); |
|
|
@ -1098,22 +1092,22 @@ int32_t komodo_checkpoint(int32_t *notarized_heightp,int32_t nHeight,uint256 has |
|
|
|
{ |
|
|
|
notary = mapBlockIndex[notarized_hash]; |
|
|
|
if ( IS_NOTARY ) |
|
|
|
printf("nHeight.%d -> (%d %s)\n",pindex->nHeight,notarized_height,notarized_hash.ToString().c_str()); |
|
|
|
LogPrint("dpow","nHeight.%d -> (%d %s)\n",pindex->nHeight,notarized_height,notarized_hash.ToString().c_str()); |
|
|
|
if ( notary->nHeight == notarized_height ) // if notarized_hash not in chain, reorg
|
|
|
|
{ |
|
|
|
if ( nHeight < notarized_height ) |
|
|
|
{ |
|
|
|
fprintf(stderr,"nHeight.%d < NOTARIZED_HEIGHT.%d\n",nHeight,notarized_height); |
|
|
|
LogPrint("dpow","nHeight.%d < NOTARIZED_HEIGHT.%d\n",nHeight,notarized_height); |
|
|
|
return(-1); |
|
|
|
} |
|
|
|
else if ( nHeight == notarized_height && memcmp(&hash,¬arized_hash,sizeof(hash)) != 0 ) |
|
|
|
{ |
|
|
|
fprintf(stderr,"nHeight.%d == NOTARIZED_HEIGHT.%d, diff hash\n",nHeight,notarized_height); |
|
|
|
LogPrint("dpow","nHeight.%d == NOTARIZED_HEIGHT.%d, diff hash\n",nHeight,notarized_height); |
|
|
|
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 LogPrint("dpow","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 ) |
|
|
|
fprintf(stderr,"%s couldnt find notarized.(%s %d) ht.%d\n",ASSETCHAINS_SYMBOL,notarized_hash.ToString().c_str(),notarized_height,pindex->nHeight); |
|
|
|
LogPrint("dpow","%s couldnt find notarized.(%s %d) ht.%d\n",ASSETCHAINS_SYMBOL,notarized_hash.ToString().c_str(),notarized_height,pindex->nHeight); |
|
|
|
return(0); |
|
|
|
} |
|
|
|
|
|
|
@ -1138,7 +1132,7 @@ void komodo_voutupdate(int32_t txi,int32_t vout,uint8_t *scriptbuf,int32_t scrip |
|
|
|
opretlen = scriptbuf[len++]; |
|
|
|
opretlen += (scriptbuf[len++] << 8); |
|
|
|
} |
|
|
|
printf("opretlen.%d vout.%d [%s].(%s)\n",opretlen,vout,(char *)&scriptbuf[len+32*2+4],ASSETCHAINS_SYMBOL); |
|
|
|
LogPrint("dpow","opretlen.%d vout.%d [%s].(%s)\n",opretlen,vout,(char *)&scriptbuf[len+32*2+4],ASSETCHAINS_SYMBOL); |
|
|
|
if ( vout == 1 && opretlen-3 >= 32*2+4 && strcmp(ASSETCHAINS_SYMBOL,(char *)&scriptbuf[len+32*2+4]) == 0 ) |
|
|
|
{ |
|
|
|
len += iguana_rwbignum(0,&scriptbuf[len],32,(uint8_t *)&hash); |
|
|
@ -1164,12 +1158,12 @@ void komodo_voutupdate(int32_t txi,int32_t vout,uint8_t *scriptbuf,int32_t scrip |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
LogPrintf("dpow: VALID %s MoM.%s [%d]\n",ASSETCHAINS_SYMBOL,MoM.ToString().c_str(),MoMdepth); |
|
|
|
LogPrint("dpow","dpow: VALID %s MoM.%s [%d]\n",ASSETCHAINS_SYMBOL,MoM.ToString().c_str(),MoMdepth); |
|
|
|
} |
|
|
|
} |
|
|
|
komodo_notarized_update(height,*notarizedheightp,hash,desttxid,MoM,MoMdepth); |
|
|
|
LogPrintf("dpow: %s ht.%d NOTARIZED.%d %s %sTXID.%s lens.(%d %d)\n",ASSETCHAINS_SYMBOL,height,*notarizedheightp,hash.ToString().c_str(),"KMD",desttxid.ToString().c_str(),opretlen,len); |
|
|
|
} else LogPrintf("dpow: notarized.%d ht %d vs prev %d vs height.%d\n",notarized,*notarizedheightp,NOTARIZED_HEIGHT,height); |
|
|
|
LogPrint("dpow","dpow: %s ht.%d NOTARIZED.%d %s %sTXID.%s lens.(%d %d)\n",ASSETCHAINS_SYMBOL,height,*notarizedheightp,hash.ToString().c_str(),"KMD",desttxid.ToString().c_str(),opretlen,len); |
|
|
|
} else LogPrint("dpow","dpow: notarized.%d ht %d vs prev %d vs height.%d\n",notarized,*notarizedheightp,NOTARIZED_HEIGHT,height); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -1193,13 +1187,13 @@ void komodo_connectblock(CBlockIndex *pindex,CBlock& block) |
|
|
|
else |
|
|
|
{ |
|
|
|
if ( pindex->nHeight != hwmheight ) |
|
|
|
LogPrintf("dpow: %s hwmheight.%d vs pindex->nHeight.%d t.%u reorg.%d\n",ASSETCHAINS_SYMBOL,hwmheight,pindex->nHeight,(uint32_t)pindex->nTime,hwmheight-pindex->nHeight); |
|
|
|
LogPrint("dpow","dpow: %s hwmheight.%d vs pindex->nHeight.%d t.%u reorg.%d\n",ASSETCHAINS_SYMBOL,hwmheight,pindex->nHeight,(uint32_t)pindex->nTime,hwmheight-pindex->nHeight); |
|
|
|
} |
|
|
|
|
|
|
|
if ( pindex != 0 ) |
|
|
|
{ |
|
|
|
height = pindex->nHeight; |
|
|
|
//txn_count = block.vtx.size();
|
|
|
|
txn_count = block.vtx.size(); |
|
|
|
//fprintf(stderr, "txn_count=%d\n", txn_count);
|
|
|
|
for (i=0; i<txn_count; i++) |
|
|
|
{ |
|
|
@ -1223,19 +1217,19 @@ void komodo_connectblock(CBlockIndex *pindex,CBlock& block) |
|
|
|
} |
|
|
|
} |
|
|
|
} else if ( block.vtx[i].vin[j].prevout.hash != zero ) { |
|
|
|
fprintf(stderr,"%s cant get scriptPubKey for ht.%d txi.%d vin.%d\n",ASSETCHAINS_SYMBOL,height,i,j); |
|
|
|
//if (IS_NOTARY)
|
|
|
|
// LogPrint("dpow","%s cant get scriptPubKey for ht.%d txi.%d vin.%d\n",ASSETCHAINS_SYMBOL,height,i,j);
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
numvalid = bitweight(signedmask); |
|
|
|
if ( numvalid >= KOMODO_MINRATIFY ) |
|
|
|
notarized = 1; |
|
|
|
if ( IS_NOTARY ) |
|
|
|
printf("(tx.%d: ",i); |
|
|
|
LogPrint("dpow","(tx.%d: ",i); |
|
|
|
for (j=0; j<numvouts; j++) |
|
|
|
{ |
|
|
|
if ( IS_NOTARY ) |
|
|
|
printf("%.8f ",dstr(block.vtx[i].vout[j].nValue)); |
|
|
|
LogPrint("dpow","%.8f ",dstr(block.vtx[i].vout[j].nValue)); |
|
|
|
len = block.vtx[i].vout[j].scriptPubKey.size(); |
|
|
|
if ( len >= (int32_t)sizeof(uint32_t) && len <= (int32_t)sizeof(scriptbuf) ) |
|
|
|
{ |
|
|
@ -1244,11 +1238,11 @@ void komodo_connectblock(CBlockIndex *pindex,CBlock& block) |
|
|
|
} |
|
|
|
} |
|
|
|
if ( NOTARY_PUBKEY33[0] != 0 ) |
|
|
|
printf(") "); |
|
|
|
LogPrint("dpow",") "); |
|
|
|
if ( NOTARY_PUBKEY33[0] != 0 ) |
|
|
|
printf("%s ht.%d\n",ASSETCHAINS_SYMBOL,height); |
|
|
|
LogPrintf("dpow: [%s] ht.%d txi.%d signedmask.%llx numvins.%d numvouts.%d notarized.%d special.%d\n",ASSETCHAINS_SYMBOL,height,i,(long long)signedmask,numvins,numvouts,notarized,specialtx); |
|
|
|
LogPrint("dpow","%s ht.%d\n",ASSETCHAINS_SYMBOL,height); |
|
|
|
LogPrint("dpow","dpow: [%s] ht.%d txi.%d signedmask.%llx numvins.%d numvouts.%d notarized.%d special.%d\n",ASSETCHAINS_SYMBOL,height,i,(long long)signedmask,numvins,numvouts,notarized,specialtx); |
|
|
|
} |
|
|
|
} else fprintf(stderr,"komodo_connectblock: unexpected null pindex\n"); |
|
|
|
} else LogPrint("dpow","komodo_connectblock: unexpected null pindex\n"); |
|
|
|
|
|
|
|
} |
|
|
|