Test
This commit is contained in:
@@ -103,7 +103,7 @@ int32_t komodo_parsestatefile(struct komodo_state *sp,FILE *fp,char *symbol,char
|
||||
errs++;
|
||||
if ( fread(¬arized_desttxid,1,sizeof(notarized_desttxid),fp) != sizeof(notarized_desttxid) )
|
||||
errs++;
|
||||
if ( 0 && sp != 0 )
|
||||
if ( ASSETCHAINS_SYMBOL[0] != 0 && sp != 0 )
|
||||
printf("%s load[%s.%d] NOTARIZED %d %s\n",ASSETCHAINS_SYMBOL,symbol,sp->NUM_NPOINTS,notarized_height,notarized_hash.ToString().c_str());
|
||||
//if ( matched != 0 ) global independent states -> inside *sp
|
||||
komodo_eventadd_notarized(sp,symbol,ht,dest,notarized_hash,notarized_desttxid,notarized_height);
|
||||
|
||||
@@ -41,12 +41,13 @@ void komodo_eventadd_notarized(struct komodo_state *sp,char *symbol,int32_t heig
|
||||
struct komodo_event_notarized N;
|
||||
if ( komodo_verifynotarization(symbol,dest,height,notarizedheight,notarized_hash,notarized_desttxid) != 0 )
|
||||
{
|
||||
if ( height > 50000 )
|
||||
if ( height > 50000 || ASSETCHAINS_SYMBOL[0] != 0 )
|
||||
printf("[%s] error validating notarization ht.%d notarized_height.%d, if on a pruned %s node this can be ignored\n",ASSETCHAINS_SYMBOL,height,notarizedheight,dest);
|
||||
}
|
||||
else
|
||||
{
|
||||
//fprintf(stderr,"validated %s ht.%d notarized %d\n",ASSETCHAINS_SYMBOL,height,notarizedheight);
|
||||
if ( ASSETCHAINS_SYMBOL[0] != 0 )
|
||||
fprintf(stderr,"validated [%s] ht.%d notarized %d\n",ASSETCHAINS_SYMBOL,height,notarizedheight);
|
||||
memset(&N,0,sizeof(N));
|
||||
N.blockhash = notarized_hash;
|
||||
N.desttxid = notarized_desttxid;
|
||||
|
||||
@@ -289,6 +289,8 @@ void komodo_notarized_update(struct komodo_state *sp,int32_t nHeight,int32_t not
|
||||
printf("komodo_notarized_update REJECT notarized_height %d > %d nHeight\n",notarized_height,nHeight);
|
||||
return;
|
||||
}
|
||||
if ( ASSETCHAINS_SYMBOL[0] != 0 )
|
||||
printf("[%s] komodo_notarized_update nHeight.%d notarized_height.%d\n",ASSETCHAINS_SYMBOL,nHeight,notarized_height);
|
||||
portable_mutex_lock(&komodo_mutex);
|
||||
sp->NPOINTS = (struct notarized_checkpoint *)realloc(sp->NPOINTS,(sp->NUM_NPOINTS+1) * sizeof(*sp->NPOINTS));
|
||||
np = &sp->NPOINTS[sp->NUM_NPOINTS++];
|
||||
|
||||
Reference in New Issue
Block a user