From dfe68a9e2897088214c2e8f933060bb37d2077ae Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 8 Jul 2019 00:41:54 -1100 Subject: [PATCH] 3 items --- src/komodo_nSPV_superlite.h | 23 +++++++++++++++-------- src/komodo_nSPV_wallet.h | 2 +- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/src/komodo_nSPV_superlite.h b/src/komodo_nSPV_superlite.h index 5210f7f87..c1494f721 100644 --- a/src/komodo_nSPV_superlite.h +++ b/src/komodo_nSPV_superlite.h @@ -336,10 +336,11 @@ UniValue NSPV_login(char *wifstr) UniValue NSPV_getinfo_req(int32_t reqht) { - uint8_t msg[64]; int32_t i,len = 0; struct NSPV_inforesp I; + uint8_t msg[64]; int32_t i,iter,len = 0; struct NSPV_inforesp I; NSPV_inforesp_purge(&NSPV_inforesult); msg[len++] = NSPV_INFO; len += iguana_rwnum(1,&msg[len],sizeof(reqht),&reqht); + for (iter=0; iter<3; iter++,sleep(1)); if ( NSPV_req(0,msg,len,NODE_NSPV,msg[0]>>1) != 0 ) { for (i=0; i>1) != 0 ) { for (i=0; i= height ) // return(NSPV_ntzs_json(&NSPV_ntzsresult)); msg[len++] = NSPV_NTZS; len += iguana_rwnum(1,&msg[len],sizeof(height),&height); + for (iter=0; iter<3; iter++,sleep(1)); if ( NSPV_req(0,msg,len,NODE_NSPV,msg[0]>>1) != 0 ) { for (i=0; i>1) != 0 ) { for (i=0; i>1) != 0 ) { for (i=0; i>1) != 0 ) { for (i=0; i> 1; data = (uint8_t *)malloc(n); decode_hex(data,n,hex); @@ -490,6 +496,7 @@ UniValue NSPV_broadcast(char *hex) memcpy(&msg[len],data,n), len += n; free(data); //fprintf(stderr,"send txid.%s\n",txid.GetHex().c_str()); + for (iter=0; iter<3; iter++,sleep(1)); if ( NSPV_req(0,msg,len,NODE_NSPV,msg[0]>>1) != 0 ) { for (i=0; isatoshis; utxos[ind] = utxos[--n]; memset(&utxos[n],0,sizeof(utxos[n])); - fprintf(stderr,"totalinputs %.8f vs total %.8f i.%d vs max.%d\n",(double)totalinputs/COIN,(double)total/COIN,i,maxinputs); + //fprintf(stderr,"totalinputs %.8f vs total %.8f i.%d vs max.%d\n",(double)totalinputs/COIN,(double)total/COIN,i,maxinputs); if ( totalinputs >= total || (i+1) >= maxinputs ) break; }