From 0eaf00aa98ece0d1cfe5a488435b0746d10ab91a Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 7 Mar 2017 21:50:50 +0200 Subject: [PATCH] Test --- basilisk/smartaddress.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/basilisk/smartaddress.c b/basilisk/smartaddress.c index 0f1ea7224..2aa4b5923 100755 --- a/basilisk/smartaddress.c +++ b/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); }