NSPV_txproofresult.
This commit is contained in:
@@ -27,6 +27,7 @@
|
|||||||
#ifndef KOMODO_NSPV_H
|
#ifndef KOMODO_NSPV_H
|
||||||
#define KOMODO_NSPV_H
|
#define KOMODO_NSPV_H
|
||||||
|
|
||||||
|
#define NSPV_FULLVALIDATION 1 // changing to 1 issues 26 remote gettransaction, per utxo! need to change to bruteforcer
|
||||||
#define NSPV_POLLITERS 10
|
#define NSPV_POLLITERS 10
|
||||||
#define NSPV_POLLMICROS 100777
|
#define NSPV_POLLMICROS 100777
|
||||||
#define NSPV_MAXVINS 64
|
#define NSPV_MAXVINS 64
|
||||||
|
|||||||
@@ -478,7 +478,7 @@ UniValue NSPV_txproof(int32_t vout,uint256 txid,int32_t height)
|
|||||||
len += iguana_rwnum(1,&msg[len],sizeof(height),&height);
|
len += iguana_rwnum(1,&msg[len],sizeof(height),&height);
|
||||||
len += iguana_rwnum(1,&msg[len],sizeof(vout),&vout);
|
len += iguana_rwnum(1,&msg[len],sizeof(vout),&vout);
|
||||||
len += iguana_rwbignum(1,&msg[len],sizeof(txid),(uint8_t *)&txid);
|
len += iguana_rwbignum(1,&msg[len],sizeof(txid),(uint8_t *)&txid);
|
||||||
fprintf(stderr,"req txproof %s/v%d at height.%d\n",txid.GetHex().c_str(),vout,height);
|
//fprintf(stderr,"req txproof %s/v%d at height.%d\n",txid.GetHex().c_str(),vout,height);
|
||||||
for (iter=0; iter<3; iter++);
|
for (iter=0; iter<3; iter++);
|
||||||
if ( NSPV_req(0,msg,len,NODE_NSPV,msg[0]>>1) != 0 )
|
if ( NSPV_req(0,msg,len,NODE_NSPV,msg[0]>>1) != 0 )
|
||||||
{
|
{
|
||||||
@@ -609,7 +609,8 @@ int32_t NSPV_gettransaction(int32_t skipvalidation,int32_t vout,uint256 txid,int
|
|||||||
if ( NSPV_txproofresult.txprooflen > 0 )
|
if ( NSPV_txproofresult.txprooflen > 0 )
|
||||||
{
|
{
|
||||||
proof.resize(NSPV_txproofresult.txprooflen);
|
proof.resize(NSPV_txproofresult.txprooflen);
|
||||||
memcpy(&proof[0],NSPV_txproofresult.txproof,txprooflen);
|
memcpy(&proof[0],NSPV_txproofresult.txproof,NSPV_txproofresult.txprooflen);
|
||||||
|
fprintf(stderr,"copy txproof[%d]\n",txprooflen);
|
||||||
}
|
}
|
||||||
NSPV_notarizations(height); // gets the prev and next notarizations
|
NSPV_notarizations(height); // gets the prev and next notarizations
|
||||||
if ( NSPV_inforesult.notarization.height >= height && (NSPV_ntzsresult.prevntz.height == 0 || NSPV_ntzsresult.prevntz.height >= NSPV_ntzsresult.nextntz.height) )
|
if ( NSPV_inforesult.notarization.height >= height && (NSPV_ntzsresult.prevntz.height == 0 || NSPV_ntzsresult.prevntz.height >= NSPV_ntzsresult.nextntz.height) )
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ std::string NSPV_signtx(UniValue &retcodes,CMutableTransaction &mtx,uint64_t txf
|
|||||||
utxovout = mtx.vin[i].prevout.n;
|
utxovout = mtx.vin[i].prevout.n;
|
||||||
if ( i > 0 )
|
if ( i > 0 )
|
||||||
sleep(1);
|
sleep(1);
|
||||||
validation = NSPV_gettransaction(0,utxovout,mtx.vin[i].prevout.hash,used[i].height,vintx);
|
validation = NSPV_gettransaction(NSPV_FULLVALIDATION,utxovout,mtx.vin[i].prevout.hash,used[i].height,vintx);
|
||||||
retcodes.push_back(validation);
|
retcodes.push_back(validation);
|
||||||
if ( validation != -1 ) // most others are degraded security
|
if ( validation != -1 ) // most others are degraded security
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user