Browse Source

Test

pull/4/head
jl777 7 years ago
parent
commit
a4f48f0079
  1. 2
      src/komodo.h
  2. 5
      src/komodo_events.h
  3. 2
      src/komodo_notary.h

2
src/komodo.h

@ -103,7 +103,7 @@ int32_t komodo_parsestatefile(struct komodo_state *sp,FILE *fp,char *symbol,char
errs++;
if ( fread(&notarized_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);

5
src/komodo_events.h

@ -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;

2
src/komodo_notary.h

@ -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++];

Loading…
Cancel
Save