diff --git a/iguana/exchanges/LP_rpc.c b/iguana/exchanges/LP_rpc.c index 026100d56..746aa08f7 100644 --- a/iguana/exchanges/LP_rpc.c +++ b/iguana/exchanges/LP_rpc.c @@ -73,15 +73,11 @@ char *issue_LP_clientgetutxos(char *destip,uint16_t destport,char *coin,int32_t //return(retstr); } -change to nanomsg write only, enforce fee, comms api char *issue_LP_notify(char *destip,uint16_t destport,char *ipaddr,uint16_t port,double profitmargin,int32_t numpeers,int32_t numutxos) { char url[512],*retstr; if ( (retstr= LP_isitme(destip,destport)) != 0 ) - { - free(retstr); - return(0); - } + return(retstr); sprintf(url,"http://%s:%u/api/stats/notify?ipaddr=%s&port=%u&profit=%.6f&numpeers=%d&numutxos=%d",destip,destport,ipaddr,port,profitmargin,numpeers,numutxos); return(LP_issue_curl("notify",destip,destport,url)); //return(issue_curlt(url,LP_HTTP_TIMEOUT)); @@ -91,10 +87,7 @@ char *issue_LP_notifyutxo(char *destip,uint16_t destport,struct LP_utxoinfo *utx { char url[4096],str[65],str2[65],str3[65],*retstr; struct _LP_utxoinfo u; uint64_t val,val2; if ( (retstr= LP_isitme(destip,destport)) != 0 ) - { - free(retstr); - return(0); - } + return(retstr); if ( utxo->iambob == 0 ) { printf("issue_LP_notifyutxo trying to send Alice %s/v%d\n",bits256_str(str,utxo->payment.txid),utxo->payment.vout); diff --git a/iguana/exchanges/LP_transaction.c b/iguana/exchanges/LP_transaction.c index ea9aaae24..b2d868576 100644 --- a/iguana/exchanges/LP_transaction.c +++ b/iguana/exchanges/LP_transaction.c @@ -1329,10 +1329,13 @@ int32_t basilisk_alicetxs(int32_t pairsock,struct basilisk_swap *swap,uint8_t *d int32_t LP_verify_otherfee(struct basilisk_swap *swap,uint8_t *data,int32_t datalen) { - // add verification and broadcast - memcpy(swap->otherfee.txbytes,data,datalen); - swap->otherfee.I.datalen = datalen; - swap->otherfee.I.actualtxid = swap->otherfee.I.signedtxid = bits256_doublesha256(0,data,datalen); + if ( LP_rawtx_spendscript(swap,swap->bobcoin.longestchain,&swap->otherfee,0,data,datalen,0) == 0 ) + { + printf("amount %.8f -> %s\n",dstr(swap->otherfee.I.amount),swap->otherfee.p2shaddr); + //memcpy(swap->otherfee.txbytes,data,datalen); + //swap->otherfee.I.datalen = datalen; + //swap->otherfee.I.actualtxid = swap->otherfee.I.signedtxid = bits256_doublesha256(0,data,datalen); + } return(0); }