From a5835818ed5bd442f08fd36392a2382b0a0f93ef Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 21 Nov 2017 23:20:01 +0400 Subject: [PATCH] Test --- iguana/exchanges/LP_zeroconf.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/iguana/exchanges/LP_zeroconf.c b/iguana/exchanges/LP_zeroconf.c index 2fa2393d8..a321cb0a3 100644 --- a/iguana/exchanges/LP_zeroconf.c +++ b/iguana/exchanges/LP_zeroconf.c @@ -19,12 +19,12 @@ // marketmaker // -int32_t LP_deposit_addr(char *depositaddr,uint8_t *script,uint8_t taddr,uint8_t pubtype,uint32_t timestamp,uint8_t *pubsecp33) +int32_t LP_deposit_addr(char *p2shaddr,uint8_t *script,uint8_t taddr,uint8_t p2shtype,uint32_t timestamp,uint8_t *pubsecp33) { uint8_t elsepub33[33],p2sh_rmd160[20]; int32_t n; decode_hex(elsepub33,33,BOTS_BONDPUBKEY33); n = bitcoin_performancebond(p2sh_rmd160,script,0,timestamp,pubsecp33,elsepub33); - bitcoin_address(depositaddr,taddr,pubtype,pubsecp33,33); + bitcoin_address(p2shaddr,taddr,p2shtype,script,n); return(n); } @@ -47,7 +47,7 @@ char *LP_zeroconf_deposit(struct iguana_info *coin,int32_t weeks,double amount,i if ( weeks >= 10000 ) return(clonestr("{\"error\":\"numweeks must be less than 10000\"}")); } else timestamp = (uint32_t)time(NULL) + 300, weeki = 0; - scriptlen = LP_deposit_addr(p2shaddr,script,coin->taddr,coin->pubtype,timestamp,G.LP_pubsecp); + scriptlen = LP_deposit_addr(p2shaddr,script,coin->taddr,coin->p2shtype,timestamp,G.LP_pubsecp); argjson = cJSON_CreateObject(); array = cJSON_CreateArray(); item = cJSON_CreateObject(); @@ -135,7 +135,7 @@ char *LP_zeroconf_claim(struct iguana_info *coin,char *depositaddr,uint32_t expi if ( expiration != 0 ) timestamp = expiration; else timestamp -= LP_WEEKMULT; - redeemlen = LP_deposit_addr(vinaddr,redeemscript,coin->taddr,coin->pubtype,timestamp,G.LP_pubsecp); + redeemlen = LP_deposit_addr(vinaddr,redeemscript,coin->taddr,coin->p2shtype,timestamp,G.LP_pubsecp); if ( strcmp(depositaddr,vinaddr) == 0 ) { printf("found %s at timestamp.%u\n",vinaddr,timestamp); @@ -209,7 +209,7 @@ void LP_zeroconf_deposits(struct iguana_info *coin) if ( spendscript[11] == 33 ) { pub33 = &spendscript[12]; - redeemlen = LP_deposit_addr(p2shaddr,redeemscript,coin->taddr,coin->pubtype,timestamp,pub33); + redeemlen = LP_deposit_addr(p2shaddr,redeemscript,coin->taddr,coin->p2shtype,timestamp,pub33); if ( len == redeemlen && (timestamp % LP_WEEKMULT) == 0 ) { bitcoin_address(coinaddr,coin->taddr,coin->pubtype,pub33,33);