Browse Source

Test

etomic
jl777 8 years ago
parent
commit
39f7557f58
  1. 6
      basilisk/smartaddress.c

6
basilisk/smartaddress.c

@ -97,9 +97,10 @@ int32_t _smartaddress_add(struct supernet_info *myinfo,bits256 privkey,char *typ
if ( myinfo->numsmartaddrs < sizeof(myinfo->smartaddrs)/sizeof(*myinfo->smartaddrs) ) if ( myinfo->numsmartaddrs < sizeof(myinfo->smartaddrs)/sizeof(*myinfo->smartaddrs) )
{ {
for (i=0; i<myinfo->numsmartaddrs; i++) for (i=0; i<myinfo->numsmartaddrs; i++)
if ( bits256_cmp(myinfo->smartaddrs[i].privkey,privkey) == 0 ) {
ap = &myinfo->smartaddrs[i];
if ( strcmp(type,ap->typestr) == 0 && bits256_cmp(ap->privkey,privkey) == 0 )
{ {
ap = &myinfo->smartaddrs[i];
n = ap->numsymbols; n = ap->numsymbols;
for (j=0; j<n; j++) for (j=0; j<n; j++)
{ {
@ -113,6 +114,7 @@ int32_t _smartaddress_add(struct supernet_info *myinfo,bits256 privkey,char *typ
smartaddress_symboladd(ap,symbol,maxbid,minask); smartaddress_symboladd(ap,symbol,maxbid,minask);
return(i+1); return(i+1);
} }
}
ap = &myinfo->smartaddrs[myinfo->numsmartaddrs]; ap = &myinfo->smartaddrs[myinfo->numsmartaddrs];
if ( smartaddress_type(symbol) < 0 ) if ( smartaddress_type(symbol) < 0 )
return(-1); return(-1);

Loading…
Cancel
Save