From d3031aaec106ea959f782944e85424240df0f120 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 5 Mar 2017 22:28:38 +0200 Subject: [PATCH] Test --- basilisk/jumblr.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/basilisk/jumblr.c b/basilisk/jumblr.c index a5e356735..c64614514 100755 --- a/basilisk/jumblr.c +++ b/basilisk/jumblr.c @@ -245,7 +245,9 @@ int32_t jumblr_itemset(struct jumblr_item *ptr,cJSON *item,char *status) { //printf("params.(%s)\n",jprint(params,0)); if ( (from= jstr(params,"fromaddress")) != 0 ) + { safecopy(ptr->src,from,sizeof(ptr->src)); + } if ( (amounts= jarray(&n,params,"amounts")) != 0 ) { for (i=0; istatus == 0 ) { if ( (retstr= jumblr_zgetoperationstatus(myinfo,coin,ptr->opid)) != 0 ) @@ -287,6 +289,15 @@ void jumblr_opidupdate(struct supernet_info *myinfo,struct iguana_info *coin,str if ( strcmp(status,"success") == 0 ) { ptr->status = jumblr_itemset(ptr,item,status); + jumblr_privkey(myinfo,BTCaddr,KMDdeposit,JUMBLR_DEPOSITPREFIX); + jumblr_privkey(myinfo,BTCaddr,KMDjumblr,""); + if ( (jumblr_addresstype(myinfo,coin,ptr->src) == 't' && jumblr_addresstype(myinfo,coin,ptr->src) == 'z' && strcmp(ptr->src,KMDdeposit) != 0) || (jumblr_addresstype(myinfo,coin,ptr->src) == 'z' && jumblr_addresstype(myinfo,coin,ptr->src) == 't' && strcmp(ptr->dest,KMDjumblr) != 0) ) + { + printf("a non-jumblr t->z pruned\n"); + free(jumblr_zgetoperationresult(myinfo,coin,ptr->opid)); + ptr->status = -1; + } + } else if ( strcmp(status,"failed") == 0 ) {