Browse Source

test

release/v0.1
jl777 8 years ago
parent
commit
dd27d47919
  1. 2
      iguana/iguana_recv.c
  2. 9
      iguana/iguana_wallet.c

2
iguana/iguana_recv.c

@ -132,7 +132,7 @@ int32_t iguana_sendblockreqPT(struct iguana_info *coin,struct iguana_peer *addr,
}
if ( block != 0 )
block->issued = addr->pendtime;
//if ( 0 && coin->current == bp )
if ( 0 && coin->current == bp )
printf("REQ.(%s) [%d:%d] %s n.%d\n",bits256_str(hexstr,hash2),bundlei,bp!=0?bp->hdrsi:-1,addr->ipaddr,addr->pendblocks);
} else printf("MSG_BLOCK null datalen.%d\n",len);
return(len);

9
iguana/iguana_wallet.c

@ -864,11 +864,10 @@ char *iguana_walletscan(struct supernet_info *myinfo,struct iguana_info *coin,in
void iguana_walletinitcheck(struct supernet_info *myinfo,struct iguana_info *coin)
{
// "wallet":{"test":{"R9S7zZzzvgb4CkiBH1i7gnFcwJuL1MYbxN":"18ab9c89ce83929db720cf26b663bf762532276146cd9d3e1f89086fcdf00053"}}
cJSON *payload,*item,*array,*child; char *account,coinaddr[128],*privstr,wifstr[128]; int32_t i,p2shflag,n; struct iguana_waccount *wacct; struct iguana_waddress waddr; bits256 privkey;
if ( myinfo->wallet == 0 && myinfo->decryptstr != 0 && (payload= cJSON_Parse(myinfo->decryptstr)) != 0 )
{
//printf("WALLET.(%s)\n",myinfo->decryptstr);
printf("WALLET.(%s)\n",myinfo->decryptstr);
if ( (array= jobj(payload,"wallet")) != 0 )
{
n = cJSON_GetArraySize(array);
@ -893,14 +892,16 @@ void iguana_walletinitcheck(struct supernet_info *myinfo,struct iguana_info *coi
{
privkey = bits256_conv(child->valuestring);
if ( iguana_waddresscalc(myinfo,coin->chain->pubtype,coin->chain->wiftype,&waddr,privkey) != 0 )
{
iguana_waddressadd(myinfo,coin,wacct,&waddr,0);
else printf("walletinitcheck: error waddresscalc\n");
printf("(%s) ",waddr.coinaddr);
} else printf("walletinitcheck: error waddresscalc\n");
}
}
}
child = child->next;
}
//printf("account.(%s)\n",account);
printf("account.(%s)\n",account);
}
item = item->next;
}

Loading…
Cancel
Save