diff --git a/iguana/iguana_peers.c b/iguana/iguana_peers.c index 4bb853cfc..08198aa8c 100755 --- a/iguana/iguana_peers.c +++ b/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 ) diff --git a/iguana/iguana_wallet.c b/iguana/iguana_wallet.c index c94f4d514..951f9b252 100755 --- a/iguana/iguana_wallet.c +++ b/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) { diff --git a/iguana/main.c b/iguana/main.c index edf2cb28a..b2a5ef303 100755 --- a/iguana/main.c +++ b/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 ) diff --git a/iguana/tests/getaddressesbyaccount b/iguana/tests/getaddressesbyaccount index 13ea2557a..1ec011ea1 100755 --- a/iguana/tests/getaddressesbyaccount +++ b/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\":\"*\"}"