Browse Source

Test

etomic
jl777 8 years ago
parent
commit
0eaf00aa98
  1. 7
      basilisk/smartaddress.c

7
basilisk/smartaddress.c

@ -29,9 +29,14 @@ int32_t smartaddress_add(struct supernet_info *myinfo,bits256 privkey,char *BTCa
bitcoin_pubkey33(myinfo->ctx,ap->pubkey33,privkey);
calc_rmd160(0,ap->rmd160,ap->pubkey33,33);
ap->pubkey = curve25519(privkey,curve25519_basepoint9());
char coinaddr[64]; bitcoin_address(coinaddr,0,ap->pubkey33,33);
char coinaddr[64]; uint8_t addrtype,rmd160[20];
bitcoin_address(coinaddr,0,ap->pubkey33,33);
for (i=0; i<20; i++)
printf("%02x",ap->rmd160[i]);
bitcoin_addr2rmd160(&addrtype,rmd160,coinaddr);
printf(", ");
for (i=0; i<20; i++)
printf("%02x",rmd160[i]);
printf (" <- rmd160 for %d %s vs %s\n",myinfo->numsmartaddrs,coinaddr,BTCaddr);
return(myinfo->numsmartaddrs);
}

Loading…
Cancel
Save