diff --git a/src/komodo_nSPV.h b/src/komodo_nSPV.h index cba34c290..77c352659 100644 --- a/src/komodo_nSPV.h +++ b/src/komodo_nSPV.h @@ -140,7 +140,7 @@ struct NSPV_utxosresp char coinaddr[64]; int64_t total,interest; int32_t nodeheight; - uint16_t numutxos,pad16; + uint16_t numutxos; uint8_t CCflag,pad8; }; int32_t NSPV_rwutxosresp(int32_t rwflag,uint8_t *serialized,struct NSPV_utxosresp *ptr) // check mempool @@ -157,7 +157,8 @@ int32_t NSPV_rwutxosresp(int32_t rwflag,uint8_t *serialized,struct NSPV_utxosres len += iguana_rwnum(rwflag,&serialized[len],sizeof(ptr->total),&ptr->total); len += iguana_rwnum(rwflag,&serialized[len],sizeof(ptr->interest),&ptr->interest); len += iguana_rwnum(rwflag,&serialized[len],sizeof(ptr->nodeheight),&ptr->nodeheight); - len += iguana_rwnum(rwflag,&serialized[len],sizeof(ptr->pad16),&ptr->pad16); + len += iguana_rwnum(rwflag,&serialized[len],sizeof(ptr->CCflag),&ptr->CCflag); + len += iguana_rwnum(rwflag,&serialized[len],sizeof(ptr->pad8),&ptr->pad8); if ( rwflag != 0 ) { memcpy(&serialized[len],ptr->coinaddr,sizeof(ptr->coinaddr)); diff --git a/src/komodo_nSPV_fullnode.h b/src/komodo_nSPV_fullnode.h index f8cc47925..c28c247cb 100644 --- a/src/komodo_nSPV_fullnode.h +++ b/src/komodo_nSPV_fullnode.h @@ -145,6 +145,7 @@ int32_t NSPV_getaddressutxos(struct NSPV_utxosresp *ptr,char *coinaddr,bool isCC maxlen = MAX_BLOCK_SIZE(tipheight) - 512; maxlen /= sizeof(*ptr->utxos); strncpy(ptr->coinaddr,coinaddr,sizeof(ptr->coinaddr)-1); + ptr->CCflag = isCC; if ( (ptr->numutxos= (int32_t)unspentOutputs.size()) >= 0 && ptr->numutxos < maxlen ) { tipheight = chainActive.LastTip()->GetHeight(); diff --git a/src/komodo_nSPV_superlite.h b/src/komodo_nSPV_superlite.h index 150d0859c..3f11ab74f 100644 --- a/src/komodo_nSPV_superlite.h +++ b/src/komodo_nSPV_superlite.h @@ -276,6 +276,7 @@ UniValue NSPV_utxosresp_json(struct NSPV_utxosresp *ptr) result.push_back(Pair("result","success")); result.push_back(Pair("utxos",NSPV_utxoresp_json(ptr->utxos,ptr->numutxos))); result.push_back(Pair("address",ptr->coinaddr)); + result.push_back(Pair("isCC",ptr->CCflag)); result.push_back(Pair("height",(int64_t)ptr->nodeheight)); result.push_back(Pair("numutxos",(int64_t)ptr->numutxos)); result.push_back(Pair("balance",(double)ptr->total/COIN)); diff --git a/src/komodo_nSPV_wallet.h b/src/komodo_nSPV_wallet.h index f04cef11b..397dbe625 100644 --- a/src/komodo_nSPV_wallet.h +++ b/src/komodo_nSPV_wallet.h @@ -218,7 +218,7 @@ UniValue NSPV_spend(char *srcaddr,char *destaddr,int64_t satoshis) // what its a return(result); } if ( strcmp(NSPV_utxosresult.coinaddr,srcaddr) != 0 || NSPV_utxosresult.nodeheight < NSPV_inforesult.height ) - NSPV_addressutxos(srcaddr); + NSPV_addressutxos(srcaddr,0); if ( strcmp(NSPV_utxosresult.coinaddr,srcaddr) != 0 || NSPV_utxosresult.nodeheight < NSPV_inforesult.height ) { result.push_back(Pair("result","error"));