This commit is contained in:
jl777
2018-07-27 01:25:50 -11:00
parent 5842e917f3
commit 1cdfa0b54b
3 changed files with 38 additions and 2 deletions

View File

@@ -92,7 +92,19 @@ char *uint256_str(char *dest,uint256 txid)
int32_t i,j=0;
for (i=31; i>=0; i--)
sprintf(&dest[j++ * 2],"%02x",((uint8_t *)&txid)[i]);
return(dest);
dest[64] = 0;
return(dest);
}
char *pubkey33_str(char *dest,uint8_t *pubkey33)
{
int32_t i;
if ( pubkey33 != 0 )
{
for (i=0; i<33; i++)
sprintf(&dest[i * 2],"%02x",pubkey33[i]);
} else dest[0] = 0;
return(dest);
}
uint256 Parseuint256(char *hexstr)