Activate validation

This commit is contained in:
jl777
2019-07-07 05:39:21 -11:00
parent fd75642394
commit 45161da432
3 changed files with 5 additions and 4 deletions

View File

@@ -19,7 +19,8 @@
// determine if it makes sense to be scanning mempool for the utxo/spentinfo requests, maybe can add isspent flag to txproof, or just use getspentinfo if broadcast fails // determine if it makes sense to be scanning mempool for the utxo/spentinfo requests, maybe can add isspent flag to txproof, or just use getspentinfo if broadcast fails
// validate proofs // pubkeys extract
// headers "sync"
// interest calculations are currently just using what is returned, it should calculate it from scratch // interest calculations are currently just using what is returned, it should calculate it from scratch
// need to validate incoming data and update only if it is valid and more recent // need to validate incoming data and update only if it is valid and more recent

View File

@@ -233,7 +233,7 @@ int32_t NSPV_gettxproof(struct NSPV_txproof *ptr,int32_t vout,uint256 txid,int32
ssMB << mb; ssMB << mb;
std::vector<uint8_t> proof(ssMB.begin(), ssMB.end()); std::vector<uint8_t> proof(ssMB.begin(), ssMB.end());
ptr->txprooflen = (int32_t)proof.size(); ptr->txprooflen = (int32_t)proof.size();
fprintf(stderr,"%s txproof.(%s)\n",txid.GetHex().c_str(),HexStr(proof).c_str()); //fprintf(stderr,"%s txproof.(%s)\n",txid.GetHex().c_str(),HexStr(proof).c_str());
if ( ptr->txprooflen > 0 ) if ( ptr->txprooflen > 0 )
{ {
ptr->txproof = (uint8_t *)calloc(1,ptr->txprooflen); ptr->txproof = (uint8_t *)calloc(1,ptr->txprooflen);

View File

@@ -94,8 +94,8 @@ int32_t NSPV_gettransaction(int32_t vout,uint256 txid,int32_t height,CTransactio
} else retval = -22; } else retval = -22;
} else retval = -1; } else retval = -1;
} }
fprintf(stderr,"NSPV_gettransaction retval would have been %d\n",retval); //fprintf(stderr,"NSPV_gettransaction retval would have been %d\n",retval);
return(0); return(retval);
} }
int32_t NSPV_vinselect(int32_t *aboveip,int64_t *abovep,int32_t *belowip,int64_t *belowp,struct NSPV_utxoresp utxos[],int32_t numunspents,int64_t value) int32_t NSPV_vinselect(int32_t *aboveip,int64_t *abovep,int32_t *belowip,int64_t *belowp,struct NSPV_utxoresp utxos[],int32_t numunspents,int64_t value)