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);
}

View File

@@ -283,9 +283,11 @@ uint256 OraclesBatontxid(uint256 reforacletxid,CPubKey refpk)
batontxid = zeroid;
cp = CCinit(&C,EVAL_ORACLES);
SetCCunspents(unspentOutputs,markeraddr);
char str[67]; fprintf(stderr,"markeraddr.(%s) %s\n",markeraddr,pubkey33_str(str,(uint8_t *)&refpk));
for (std::vector<std::pair<CAddressUnspentKey, CAddressUnspentValue> >::const_iterator it=unspentOutputs.begin(); it!=unspentOutputs.end(); it++)
{
txid = it->first.txhash;
fprintf(stderr,"check %s\n",uint256_str(str,txid));
height = (int32_t)it->second.blockHeight;
if ( myGetTransaction(txid,regtx,hash) != 0 )
{