Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
5b87b3a3c9
  1. 2
      iguana/SuperNET_keys.c
  2. 2
      iguana/iguana777.c
  3. 2
      iguana/iguana_accept.c
  4. 2
      iguana/iguana_wallet.c
  5. 2
      iguana/main.c
  6. 1
      iguana/tests/setaccountB

2
iguana/SuperNET_keys.c

@ -398,7 +398,7 @@ TWO_STRINGS(SuperNET,decryptjson,password,permanentfile)
wallet2priv = bits256_conv(fname2);
if ( (retjson= SuperNET_decryptedjson(destfname,pass,sizeof(pass),wallethash,fname2,sizeof(fname2),wallet2priv)) != 0 )
{
printf("decrypt pass.(%s) fname2.(%s) -> destfname.(%s)\n",pass,fname2,destfname);
//printf("decrypt pass.(%s) fname2.(%s) -> destfname.(%s)\n",pass,fname2,destfname);
//obj = jduplicate(jobj(retjson,"payload"));
//jdelete(retjson,"payload");
//jadd(retjson,"result",obj);

2
iguana/iguana777.c

@ -153,7 +153,7 @@ int32_t iguana_peermetrics(struct supernet_info *myinfo,struct iguana_info *coin
for (i=n=0; i<coin->MAXPEERS; i++)
{
addr = &coin->peers.active[i];
if ( addr->usock < 0 || addr->dead != 0 || addr->ready == 0 )
if ( addr->usock < 0 || addr->dead != 0 || addr->ready == 0 || addr->ipbits == 0 )
continue;
addr->pendblocks = 0;
if ( addr->recvblocks > coin->peers.mostreceived )

2
iguana/iguana_accept.c

@ -275,7 +275,7 @@ int32_t iguana_inv2packet(uint8_t *serialized,int32_t maxsize,int32_t type,bits2
}
if ( len > maxsize )
return(-1);
return(len);
return(len - sizeof(struct iguana_msghdr));
}
int32_t iguana_peerhdrrequest(struct iguana_info *coin,uint8_t *serialized,int32_t maxsize,struct iguana_peer *addr,bits256 hash2)

2
iguana/iguana_wallet.c

@ -227,7 +227,7 @@ struct iguana_waddress *iguana_waccountswitch(struct supernet_info *myinfo,struc
iguana_waddressdelete(myinfo,coin,wacct,coinaddr);
}
}
if ( waddr == 0 && (wacct= iguana_waccountcreate(myinfo,coin,account)) != 0 )
if ( (wacct= iguana_waccountcreate(myinfo,coin,account)) != 0 )
{
waddr = iguana_waddresscreate(myinfo,coin,wacct,coinaddr,redeemScript);
if ( flag != 0 && redeemScript == 0 )

2
iguana/main.c

@ -1153,7 +1153,7 @@ void iguana_appletests(struct supernet_info *myinfo)
//int32_t iguana_schnorr_test(void *ctx);
//iguana_schnorr_test(myinfo->ctx); getchar();
if ( 1 && (str= SuperNET_JSON(myinfo,cJSON_Parse("{\"RELAY\":1,\"VALIDATE\":1,\"prefetchlag\":-1,\"agent\":\"iguana\",\"method\":\"addcoin\",\"startpend\":4,\"endpend\":4,\"services\":129,\"maxpeers\":64,\"newcoin\":\"BTC\",\"active\":1,\"numhelpers\":4,\"poll\":100}"),0,myinfo->rpcport)) != 0 )
if ( 1 && (str= SuperNET_JSON(myinfo,cJSON_Parse("{\"RELAY\":1,\"VALIDATE\":1,\"prefetchlag\":-1,\"agent\":\"iguana\",\"method\":\"addcoin\",\"startpend\":4,\"endpend\":4,\"services\":129,\"maxpeers\":64,\"newcoin\":\"BTCD\",\"active\":1,\"numhelpers\":4,\"poll\":100}"),0,myinfo->rpcport)) != 0 )
{
free(str);
if ( 0 && (str= SuperNET_JSON(myinfo,cJSON_Parse("{\"RELAY\":1,\"VALIDATE\":1,\"prefetchlag\":-1,\"agent\":\"iguana\",\"method\":\"addcoin\",\"startpend\":4,\"endpend\":4,\"services\":129,\"maxpeers\":64,\"newcoin\":\"BTC\",\"active\":1,\"numhelpers\":4,\"poll\":100}"),0,myinfo->rpcport)) != 0 )

1
iguana/tests/setaccountB

@ -0,0 +1 @@
curl --url "http://127.0.0.1:7778" --data "{\"method\":\"setaccount\",\"params\":[\"RSM6HUAiQabjEzoXrtptdyMUrUsbYicTDE\", \"newaccount2\"]}"
Loading…
Cancel
Save