jl777 8 years ago
parent
commit
0cde34bb57
  1. 4
      crypto777/iguana_utils.c
  2. 4
      iguana/iguana_notary.c

4
crypto777/iguana_utils.c

@ -364,8 +364,8 @@ int32_t decode_hex(unsigned char *bytes,int32_t n,char *hex)
memset(bytes,0,n); memset(bytes,0,n);
return(n); return(n);
} }
//if ( hex[n-1] == '\n' || hex[n-1] == '\r' ) if ( hex[n-1] == '\n' || hex[n-1] == '\r' )
// hex[--n] = 0; hex[--n] = 0;
if ( n == 0 || (hex[n*2+1] == 0 && hex[n*2] != 0) ) if ( n == 0 || (hex[n*2+1] == 0 && hex[n*2] != 0) )
{ {
if ( n > 0 ) if ( n > 0 )

4
iguana/iguana_notary.c

@ -225,7 +225,9 @@ TWO_STRINGS(iguana,dpow,symbol,pubkey)
return(clonestr("{\"error\":\"cant dPoW same coin again\"}")); return(clonestr("{\"error\":\"cant dPoW same coin again\"}"));
} }
decode_hex(dp->minerkey33,33,pubkey); decode_hex(dp->minerkey33,33,pubkey);
printf("DPOW with pubkey.(%s)\n",pubkey); for (i=0; i<33; i++)
printf("%02x",dp->minerkey33[i]);
printf(" DPOW with pubkey.(%s)\n",pubkey);
if ( bitcoin_pubkeylen(dp->minerkey33) <= 0 ) if ( bitcoin_pubkeylen(dp->minerkey33) <= 0 )
return(clonestr("{\"error\":\"illegal pubkey\"}")); return(clonestr("{\"error\":\"illegal pubkey\"}"));
strcpy(dp->symbol,symbol); strcpy(dp->symbol,symbol);

Loading…
Cancel
Save