|
|
@ -56,7 +56,8 @@ struct iguana_waddress *iguana_waddressalloc(uint8_t addrtype,char *symbol,char |
|
|
|
|
|
|
|
struct iguana_waccount *iguana_waccountfind(struct supernet_info *myinfo,struct iguana_info *coin,char *account) |
|
|
|
{ |
|
|
|
struct iguana_waccount *wacct; |
|
|
|
struct iguana_waccount *wacct = 0; |
|
|
|
if ( account != 0 && wacct != 0 ) |
|
|
|
HASH_FIND(hh,myinfo->wallet,account,strlen(account)+1,wacct); |
|
|
|
//printf("waccountfind.(%s) -> wacct.%p\n",account,wacct);
|
|
|
|
return(wacct); |
|
|
@ -64,7 +65,12 @@ struct iguana_waccount *iguana_waccountfind(struct supernet_info *myinfo,struct |
|
|
|
|
|
|
|
struct iguana_waccount *iguana_waccountcreate(struct supernet_info *myinfo,struct iguana_info *coin,char *account) |
|
|
|
{ |
|
|
|
struct iguana_waccount *wacct,*ptr; int32_t len = (int32_t)strlen(account)+1; |
|
|
|
struct iguana_waccount *wacct=0,*ptr; int32_t len; |
|
|
|
if ( account != 0 ) |
|
|
|
{ |
|
|
|
if ( account[0] == 0 ) |
|
|
|
account = "default"; |
|
|
|
len = (int32_t)strlen(account)+1; |
|
|
|
HASH_FIND(hh,myinfo->wallet,account,len,wacct); |
|
|
|
if ( wacct == 0 ) |
|
|
|
{ |
|
|
@ -76,6 +82,7 @@ struct iguana_waccount *iguana_waccountcreate(struct supernet_info *myinfo,struc |
|
|
|
if ( (ptr= iguana_waccountfind(myinfo,coin,account)) != wacct ) |
|
|
|
printf("iguana_waccountcreate verify error %p vs %p\n",ptr,wacct); |
|
|
|
} |
|
|
|
} |
|
|
|
return(wacct); |
|
|
|
} |
|
|
|
|
|
|
|