Test
This commit is contained in:
@@ -374,8 +374,8 @@ bits256 get_KMDblockhash(int32_t height)
|
|||||||
}
|
}
|
||||||
else if ( retstr != 0 )
|
else if ( retstr != 0 )
|
||||||
{
|
{
|
||||||
fprintf(stderr,"get_KMDblockhash.(%s)\n",retstr);
|
fprintf(stderr,"get_KMDblockhash.(%s) %d\n",retstr,(int32_t)strlen(retjson));
|
||||||
if ( strlen(retstr) == 64 )
|
if ( strlen(retstr) >= 64 )
|
||||||
decode_hex(hash.bytes,32,retstr);
|
decode_hex(hash.bytes,32,retstr);
|
||||||
free(retstr);
|
free(retstr);
|
||||||
}
|
}
|
||||||
@@ -409,9 +409,15 @@ int32_t get_KMDheader(bits256 *blockhashp,bits256 *merklerootp,int32_t prevheigh
|
|||||||
if ( height > 0 )
|
if ( height > 0 )
|
||||||
{
|
{
|
||||||
*blockhashp = get_KMDblockhash(height);
|
*blockhashp = get_KMDblockhash(height);
|
||||||
*merklerootp = get_KMDmerkleroot(*blockhashp);
|
if ( bits256_nonz(*blockhashp) != 0 )
|
||||||
return(height);
|
{
|
||||||
|
*merklerootp = get_KMDmerkleroot(*blockhashp);
|
||||||
|
if ( bits256_nonz(*merklerootp) != 0 )
|
||||||
|
return(height);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
memset(blockhashp,0,sizeof(*blockhashp));
|
||||||
|
memset(merklerootp,0,sizeof(*merklerootp));
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user