Browse Source

Test

etomic
jl777 8 years ago
parent
commit
d8c3bcdbf1
  1. 6
      basilisk/basilisk_swap.c
  2. 1
      basilisk/smartaddress.c

6
basilisk/basilisk_swap.c

@ -662,10 +662,10 @@ cJSON *basilisk_privkeyarray(struct supernet_info *myinfo,struct iguana_info *co
bitcoin_priv2wif(wifstr,waddr->privkey,coin->chain->wiftype);
jaddistr(privkeyarray,waddr->wifstr);
}
else if ( smartaddress(myinfo,&privkey,coinaddr) > 0 )
else if ( smartaddress(myinfo,&privkey,coinaddr) >= 0 )
{
bitcoin_priv2wif(wifstr,waddr->privkey,coin->chain->wiftype);
jaddistr(privkeyarray,waddr->wifstr);
bitcoin_priv2wif(wifstr,privkey,coin->chain->wiftype);
jaddistr(privkeyarray,wifstr);
}
else printf("cant find (%s) in wallet\n",coinaddr);
} else printf("cant coinaddr from (%s).v%d\n",bits256_str(str,txid),vout);

1
basilisk/smartaddress.c

@ -29,6 +29,7 @@ int32_t smartaddress_add(struct supernet_info *myinfo,bits256 privkey)
bitcoin_pubkey33(myinfo->ctx,ap->pubkey33,privkey);
ap->pubkey = curve25519(privkey,curve25519_basepoint9());
calc_rmd160(0,ap->rmd160,ap->pubkey33,33);
return(myinfo->numsmartaddrs);
}
printf("too many smartaddresses %d vs %d\n",myinfo->numsmartaddrs,(int32_t)(sizeof(myinfo->smartaddrs)/sizeof(*myinfo->smartaddrs)));
return(-1);

Loading…
Cancel
Save