This commit is contained in:
jl777
2019-01-29 03:04:20 -11:00
parent 08ee5412fa
commit 70fb396189

View File

@@ -537,8 +537,11 @@ UniValue sudoku_txidinfo(uint64_t txfee,struct CCcontract_info *cp,cJSON *params
char str[65],*txidstr; uint256 txid;
if ( (txidstr= jprint(params,0)) != 0 )
{
if ( txidstr[0] == '"' )
if ( txidstr[0] == '"' && txidstr[strlen(txidstr)-1] == '"' )
{
txidstr[strlen(txidstr)-1] = 0;
txidstr++;
}
//printf("params -> (%s)\n",txidstr);
decode_hex((uint8_t *)&txid,32,txidstr);
printf("txid.(%s) <- %s\n",txid.GetHex().c_str(),txidstr);