This commit is contained in:
jl777
2018-09-12 00:12:25 -11:00
parent ccf003ff1c
commit d91c603c75
2 changed files with 4 additions and 3 deletions

View File

@@ -19,7 +19,6 @@
#include <memory.h>
#include "cJSON.c"
char hexbyte(int32_t c)
{
c &= 0xf;
@@ -452,9 +451,9 @@ int32_t get_oracledata(int32_t prevheight,char *hexstr,int32_t maxsize,char *for
for (i=0; i<4; i++)
sprintf(&hexstr[i*2],"%02x",(uint8_t)((height >> (i*8)) & 0xff));
for (i=0; i<32; i++)
sprintf(&hexstr[8 + i*2],"%02x",blockhash.bytes[i]);
sprintf(&hexstr[8 + (31-i)*2],"%02x",blockhash.bytes[i]);
for (i=0; i<32; i++)
sprintf(&hexstr[8 + 64 + i*2],"%02x",merkleroot.bytes[i]);
sprintf(&hexstr[8 + 64 + (31-i)*2],"%02x",merkleroot.bytes[i]);
hexstr[8 + 64*2] = 0;
return(height);
}