Browse Source

Merge remote-tracking branch 'refs/remotes/jl777/master'

release/v0.1
usamir 9 years ago
parent
commit
d0efe6898a
  1. 4
      iguana/iguana_peers.c
  2. 3
      iguana/iguana_wallet.c
  3. 4
      iguana/main.c
  4. 2
      iguana/tests/getaddressesbyaccount

4
iguana/iguana_peers.c

@ -480,7 +480,11 @@ int32_t iguana_send(struct iguana_info *coin,struct iguana_peer *addr,uint8_t *s
{
if ( coin->peers != 0 && coin->peers->shuttingdown != 0 )
return(-1);
#ifdef _WIN32
if ( (numsent= (int32_t)send(usock,serialized,remains,0)) < 0 )
#else
if ( (numsent= (int32_t)send(usock,serialized,remains,MSG_NOSIGNAL)) < 0 )
#endif
{
printf("send errno.%d %s\n",errno,strerror(errno));
if ( errno != EAGAIN && errno != EWOULDBLOCK )

3
iguana/iguana_wallet.c

@ -951,8 +951,7 @@ STRING_ARG(bitcoinrpc,validateaddress,address)
init_hexbytes_noT(str,pubkey,bitcoin_pubkeylen(pubkey));
jaddstr(retjson,"pubkey",str);
cJSON_AddTrueToObject(retjson,"ismine");
}
else cJSON_AddFalseToObject(retjson,"ismine");
} else cJSON_AddFalseToObject(retjson,"ismine");
//portable_mutex_lock(&myinfo->allcoins_mutex);
HASH_ITER(hh,myinfo->allcoins,other,tmp)
{

4
iguana/main.c

@ -552,10 +552,10 @@ void iguana_appletests(struct supernet_info *myinfo)
bitcoin_sharedsecret(myinfo->ctx,hash2,pubkey,33);
printf("secp256k1 elapsed %.3f for %d iterations\n",OS_milliseconds() - startmillis,i);
getchar();**/
if ( 1 && (str= SuperNET_JSON(myinfo,cJSON_Parse("{\"protover\":70002,\"RELAY\":1,\"VALIDATE\":0,\"portp2p\":14631,\"rpc\":14632,\"agent\":\"iguana\",\"method\":\"addcoin\",\"startpend\":64,\"endpend\":64,\"services\":129,\"maxpeers\":8,\"newcoin\":\"BTCD\",\"active\":1,\"numhelpers\":1,\"poll\":1}"),0,myinfo->rpcport)) != 0 )
if ( 1 && (str= SuperNET_JSON(myinfo,cJSON_Parse("{\"protover\":70002,\"RELAY\":0,\"VALIDATE\":0,\"portp2p\":14631,\"rpc\":14632,\"agent\":\"iguana\",\"method\":\"addcoin\",\"startpend\":64,\"endpend\":64,\"services\":128,\"maxpeers\":8,\"newcoin\":\"BTCD\",\"active\":1,\"numhelpers\":1,\"poll\":1}"),0,myinfo->rpcport)) != 0 )
{
free(str);
if ( 0 && (str= SuperNET_JSON(myinfo,cJSON_Parse("{\"portp2p\":8333,\"RELAY\":0,\"VALIDATE\":0,\"agent\":\"iguana\",\"method\":\"addcoin\",\"startpend\":1,\"endpend\":1,\"services\":128,\"maxpeers\":8,\"newcoin\":\"BTC\",\"active\":0,\"numhelpers\":1,\"poll\":100}"),0,myinfo->rpcport)) != 0 )
if ( 1 && (str= SuperNET_JSON(myinfo,cJSON_Parse("{\"portp2p\":8333,\"RELAY\":0,\"VALIDATE\":0,\"agent\":\"iguana\",\"method\":\"addcoin\",\"startpend\":1,\"endpend\":1,\"services\":128,\"maxpeers\":8,\"newcoin\":\"BTC\",\"active\":0,\"numhelpers\":1,\"poll\":100}"),0,myinfo->rpcport)) != 0 )
{
free(str);
if ( 0 && (str= SuperNET_JSON(myinfo,cJSON_Parse("{\"agent\":\"SuperNET\",\"method\":\"login\",\"handle\":\"alice\",\"password\":\"alice\",\"passphrase\":\"alice\"}"),0,myinfo->rpcport)) != 0 )

2
iguana/tests/getaddressesbyaccount

@ -1 +1 @@
curl --url "http://127.0.0.1:7778" --data "{\"coin\":\"BTC\",\"agent\":\"bitcoinrpc\",\"method\":\"getaddressesbyaccount\",\"account\":\"*\"}"
curl --url "http://127.0.0.1:7778" --data "{\"coin\":\"BTCD\",\"agent\":\"bitcoinrpc\",\"method\":\"getaddressesbyaccount\",\"account\":\"*\"}"

Loading…
Cancel
Save