From e87602ffc613d9bbf7add8ca3d58ce4bd012fb04 Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 22 Jul 2019 05:32:52 -1100 Subject: [PATCH] Syntax --- src/komodo_nSPV_fullnode.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/komodo_nSPV_fullnode.h b/src/komodo_nSPV_fullnode.h index 2700f293b..d35c6e9ad 100644 --- a/src/komodo_nSPV_fullnode.h +++ b/src/komodo_nSPV_fullnode.h @@ -408,7 +408,9 @@ int32_t NSPV_gettxproof(struct NSPV_txproof *ptr,int32_t vout,uint256 txid,int32 return(-1); ptr->txid = txid; ptr->vout = vout; - if ( height != 0 ) + if ( height == 0 ) + ptr->height = komodo_blockheight(hashBlock); + else { ptr->height = height; if ((pindex= komodo_chainactive(height)) != 0 && komodo_blockload(block,pindex) == 0 ) @@ -440,11 +442,6 @@ int32_t NSPV_gettxproof(struct NSPV_txproof *ptr,int32_t vout,uint256 txid,int32 } } } - else - { - if ( GetTransaction(args->txid,tx,hashBlock,false) != 0 ) - ptr->height = komodo_blockheight(hashBlock); - } ptr->unspentvalue = CCgettxout(txid,vout,1,1); return(sizeof(*ptr) - sizeof(ptr->tx) - sizeof(ptr->txproof) + ptr->txlen + ptr->txprooflen); }