This commit is contained in:
jl777
2017-01-16 13:34:40 +02:00
parent de28264f07
commit eee286628f
3 changed files with 9 additions and 3 deletions

View File

@@ -366,7 +366,12 @@ int32_t komodo_verifynotarizedscript(uint8_t *script,int32_t len,uint256 NOTARIZ
int32_t komodo_verifynotarization(char *symbol,char *dest,int32_t height,int32_t NOTARIZED_HEIGHT,uint256 NOTARIZED_HASH,uint256 NOTARIZED_DESTTXID)
{
char params[256],*jsonstr,*hexstr; uint8_t script[8192]; int32_t n,len,retval = -1; cJSON *txjson,*vouts,*vout,*skey;
sprintf(params,"[\"%s\", 1]",NOTARIZED_DESTTXID.ToString().c_str());
params[0] = '[';
params[1] = '"';
for (i=0; i<32; i++)
sprintf(&params[i*2 + 2],"%02x",((uint8_t *)&NOTARIZED_DESTTXID)[i]);
strcat(params,"\", 1]");
//sprintf(params,"[\"%s\", 1]",NOTARIZED_DESTTXID.ToString().c_str());
printf("src.%s dest.%s params.[%s] ht.%d notarized.%d\n",symbol,dest,params,height,NOTARIZED_HEIGHT);
if ( strcmp(dest,"KMD") == 0 )
{
@@ -379,7 +384,7 @@ int32_t komodo_verifynotarization(char *symbol,char *dest,int32_t height,int32_t
{
if ( BTCUSERPASS[0] != 0 )
{
printf("BTCUSERPASS.(%s)\n",BTCUSERPASS);
//printf("BTCUSERPASS.(%s)\n",BTCUSERPASS);
jsonstr = komodo_issuemethod(BTCUSERPASS,(char *)"getrawtransaction",params,8332);
}
//else jsonstr = _dex_getrawtransaction();