test
This commit is contained in:
@@ -57,12 +57,12 @@ int32_t iguana_rwbignum(int32_t rwflag,uint8_t *serialized,int32_t len,uint8_t *
|
|||||||
if ( rwflag == 0 )
|
if ( rwflag == 0 )
|
||||||
{
|
{
|
||||||
for (i=0; i<len; i++)
|
for (i=0; i<len; i++)
|
||||||
endianedp[i] = serialized[len - 1 - i];
|
endianedp[i] = serialized[i];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
for (i=0; i<len; i++)
|
for (i=0; i<len; i++)
|
||||||
serialized[i] = endianedp[len - 1 - i];
|
serialized[i] = endianedp[i];
|
||||||
}
|
}
|
||||||
return(len);
|
return(len);
|
||||||
}
|
}
|
||||||
@@ -224,7 +224,7 @@ void komodo_connectblock(CBlockIndex *pindex,CBlock& block)
|
|||||||
for (j=0; j<numvins; j++)
|
for (j=0; j<numvins; j++)
|
||||||
{
|
{
|
||||||
if ( (scriptstr= komodo_gettxout(block.vtx[i].vin[j].prevout.hash,block.vtx[i].vin[j].prevout.n)) != 0 )
|
if ( (scriptstr= komodo_gettxout(block.vtx[i].vin[j].prevout.hash,block.vtx[i].vin[j].prevout.n)) != 0 )
|
||||||
printf("ht.%d i.%d j.%d (%s)\n",height,i,j,scriptstr);
|
printf("vini ht.%d i.%d j.%d (%s)\n",height,i,j,scriptstr);
|
||||||
}
|
}
|
||||||
numvouts = block.vtx[i].vout.size();
|
numvouts = block.vtx[i].vout.size();
|
||||||
for (j=0; j<numvouts; j++)
|
for (j=0; j<numvouts; j++)
|
||||||
|
|||||||
@@ -460,13 +460,19 @@ Value gettxout(const Array& params, bool fHelp)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
char *komodo_gettxout(uint256 hash,int32_t n)
|
char *komodo_getspendscript(uint256 hash,int32_t n)
|
||||||
{
|
{
|
||||||
CCoins coins; CBlockIndex *pindex;
|
CCoins coins; CBlockIndex *pindex;
|
||||||
if ( pcoinsTip->GetCoins(hash,coins) == 0 )
|
if ( pcoinsTip->GetCoins(hash,coins) == 0 )
|
||||||
return(0);
|
{
|
||||||
if ( n < 0 || (unsigned int)n >= coins.vout.size() || coins.vout[n].IsNull() )
|
printf("null pcoinsTip->GetCoins\n");
|
||||||
return(0);
|
return(0);
|
||||||
|
}
|
||||||
|
if ( n < 0 || (unsigned int)n >= coins.vout.size() )
|
||||||
|
{
|
||||||
|
printf("komodo_getspendscript illegal n.%d size.%d\n",n,coins.vout.size());
|
||||||
|
return(0);
|
||||||
|
}
|
||||||
BlockMap::iterator it = mapBlockIndex.find(pcoinsTip->GetBestBlock());
|
BlockMap::iterator it = mapBlockIndex.find(pcoinsTip->GetBestBlock());
|
||||||
pindex = it->second;
|
pindex = it->second;
|
||||||
return((char *)coins.vout[n].scriptPubKey.ToString().c_str());
|
return((char *)coins.vout[n].scriptPubKey.ToString().c_str());
|
||||||
|
|||||||
Reference in New Issue
Block a user