This commit is contained in:
jl777
2016-11-11 12:36:04 -03:00
parent 93f4931eb6
commit 6a8e70a959
2 changed files with 9 additions and 6 deletions

View File

@@ -253,10 +253,13 @@ void komodo_assetchain_pubkeys(char *jsonstr)
for (i=0; i<n; i++) for (i=0; i<n; i++)
{ {
if ( (hexstr= jstri(array,i)) != 0 && is_hexstr(hexstr,0) == 66 ) if ( (hexstr= jstri(array,i)) != 0 && is_hexstr(hexstr,0) == 66 )
{
decode_hex(pubkeys[i],33,hexstr); decode_hex(pubkeys[i],33,hexstr);
fprintf(stderr,"i.%d of n.%d pubkey.(%s)\n",hexstr);
}
else else
{ {
printf("illegal hexstr.(%s) i.%d of n.%d\n",hexstr,i,n); fprintf(stderr,"illegal hexstr.(%s) i.%d of n.%d\n",hexstr,i,n);
break; break;
} }
} }
@@ -265,9 +268,9 @@ void komodo_assetchain_pubkeys(char *jsonstr)
komodo_init(0); komodo_init(0);
komodo_notarysinit(0,pubkeys,n); komodo_notarysinit(0,pubkeys,n);
printf("initialize pubkeys[%d]\n",n); printf("initialize pubkeys[%d]\n",n);
} } else fprintf(stderr,"komodo_assetchain_pubkeys i.%d vs n.%d\n",i,n);
} else printf("assetchain pubkeys n.%d\n",n); } else fprintf(stderr,"assetchain pubkeys n.%d\n",n);
} }
else if ( jsonstr != 0 ) else if ( jsonstr != 0 )
printf("assetchain pubkeys couldnt parse.(%s)\n",jsonstr); fprintf(stderr,"assetchain pubkeys couldnt parse.(%s)\n",jsonstr);
} }

View File

@@ -161,12 +161,12 @@ bool CheckProofOfWork(int32_t height,uint8_t *pubkey33,uint256 hash, unsigned in
printf(" special.%d notaryid.%d ht.%d mod.%d error\n",special,notaryid,height,(height % 35)); printf(" special.%d notaryid.%d ht.%d mod.%d error\n",special,notaryid,height,(height % 35));
return error("CheckProofOfWork(): hash doesn't match nBits"); return error("CheckProofOfWork(): hash doesn't match nBits");
} }
if ( flag != 0 ) /*if ( flag != 0 )
{ {
for (i=0; i<33; i++) for (i=0; i<33; i++)
fprintf(stderr,"%02x",pubkey33[i]); fprintf(stderr,"%02x",pubkey33[i]);
fprintf(stderr," <- Round Robin ht.%d for notary.%d special.%d\n",height,notaryid,special); fprintf(stderr," <- Round Robin ht.%d for notary.%d special.%d\n",height,notaryid,special);
} }*/
return true; return true;
} }