Browse Source

Dont print params on rpc error

pass-iguana-arg
jl777 7 years ago
parent
commit
26420ba6bc
  1. 4
      crypto777/bitcoind_RPC.c
  2. 6
      iguana/SuperNET_keys.c
  3. 2
      iguana/dpow/dpow_rpc.c
  4. 2
      iguana/iguana_wallet.c

4
crypto777/bitcoind_RPC.c

@ -80,13 +80,13 @@ char *post_process_bitcoind_RPC(char *debugstr,char *command,char *rpcstr,char *
if ( command == 0 || rpcstr == 0 || rpcstr[0] == 0 ) if ( command == 0 || rpcstr == 0 || rpcstr[0] == 0 )
{ {
if ( strcmp(command,"signrawtransaction") != 0 && strcmp(command,"getrawtransaction") != 0 ) if ( strcmp(command,"signrawtransaction") != 0 && strcmp(command,"getrawtransaction") != 0 )
printf("<<<<<<<<<<< A bitcoind_RPC: %s post_process_bitcoind_RPC.%s.[%s]\n",debugstr,command,params); printf("<<<<<<<<<<< A bitcoind_RPC: %s post_process_bitcoind_RPC.%s\n",debugstr,command);
return(rpcstr); return(rpcstr);
} }
json = cJSON_Parse(rpcstr); json = cJSON_Parse(rpcstr);
if ( json == 0 ) if ( json == 0 )
{ {
printf("<<<<<<<<<<< B bitcoind_RPC: %s post_process_bitcoind_RPC.%s can't parse.(%s) params.(%s)\n",debugstr,command,rpcstr,params); printf("<<<<<<<<<<< B bitcoind_RPC: %s post_process_bitcoind_RPC.%s can't parse.(%s)\n",debugstr,command,rpcstr);
free(rpcstr); free(rpcstr);
return(0); return(0);
} }

6
iguana/SuperNET_keys.c

@ -339,7 +339,7 @@ int32_t iguana_wifstr_valid(char *wifstr)
return(0); return(0);
if ( A > 5*a || a > 5*A || a > n*20 || A > n*20 ) // unlikely it is a real wif if ( A > 5*a || a > 5*A || a > n*20 || A > n*20 ) // unlikely it is a real wif
{ {
printf("reject wif %s due to n.%d a.%d A.%d (%d %d %d %d)\n",wifstr,n,a,A,A > 5*a,a < 5*A,a > n*20,A > n*20); //printf("reject wif %s due to n.%d a.%d A.%d (%d %d %d %d)\n",wifstr,n,a,A,A > 5*a,a < 5*A,a > n*20,A > n*20);
return(0); return(0);
} }
bitcoin_wif2priv(&wiftype,&privkey,wifstr); bitcoin_wif2priv(&wiftype,&privkey,wifstr);
@ -355,9 +355,9 @@ int32_t iguana_wifstr_valid(char *wifstr)
bitcoin_priv2wiflong(cmpstr2,privkey,wiftype); bitcoin_priv2wiflong(cmpstr2,privkey,wiftype);
if ( bits256_cmp(privkey,cmpkey) == 0 ) if ( bits256_cmp(privkey,cmpkey) == 0 )
return(1); return(1);
char str[65],str2[65]; printf("mismatched wifstr %s -> %s -> %s %s %s\n",wifstr,bits256_str(str,privkey),cmpstr,bits256_str(str2,cmpkey),cmpstr2); // char str[65],str2[65]; printf("mismatched wifstr %s -> %s -> %s %s %s\n",wifstr,bits256_str(str,privkey),cmpstr,bits256_str(str2,cmpkey),cmpstr2);
} }
char str[65]; printf("%s is not a wif, privkey.%s\n",wifstr,bits256_str(str,privkey)); //char str[65]; printf("%s is not a wif, privkey.%s\n",wifstr,bits256_str(str,privkey));
return(0); return(0);
} }

2
iguana/dpow/dpow_rpc.c

@ -608,7 +608,7 @@ char *dpow_signrawtransaction(struct supernet_info *myinfo,struct iguana_info *c
} }
} }
retstr = bitcoinrpc_signrawtransaction(myinfo,coin,0,0,rawtx,vins,privkeys,"ALL"); retstr = bitcoinrpc_signrawtransaction(myinfo,coin,0,0,rawtx,vins,privkeys,"ALL");
printf("call sign.(%s) vins.(%s) privs.(%s) -> (%s)\n",rawtx,jprint(vins,0),jprint(privkeys,0),retstr); //printf("call sign.(%s) vins.(%s) privs.(%s) -> (%s)\n",rawtx,jprint(vins,0),jprint(privkeys,0),retstr);
free_json(privkeys); free_json(privkeys);
return(retstr); return(retstr);
} }

2
iguana/iguana_wallet.c

@ -980,7 +980,7 @@ cJSON *iguana_privkeysjson(struct supernet_info *myinfo,struct iguana_info *coin
if ( address != 0 ) if ( address != 0 )
{ {
strcpy(&addresses[64 * n++],address); strcpy(&addresses[64 * n++],address);
} else printf("cant get address from.(%s)\n",jprint(item,0)); } //else printf("cant get address from.(%s)\n",jprint(item,0));
} }
for (i=0; i<n; i++) for (i=0; i<n; i++)
{ {

Loading…
Cancel
Save